X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/xvm-munin-config.git/blobdiff_plain/75ea3dcbd8ad5baa6fc2cf734666a2ab3ba3cd55..3b0ae174b868d5cfa7dfdb645b014a98a69c0e2a:/debian/xvm-munin-host-config.postinst?ds=inline

diff --git a/debian/xvm-munin-host-config.postinst b/debian/xvm-munin-host-config.postinst
index 5060710..fc2de88 100755
--- a/debian/xvm-munin-host-config.postinst
+++ b/debian/xvm-munin-host-config.postinst
@@ -24,16 +24,25 @@ case "$1" in
         adduser munin adm
         
         # So munin can sudo to get to postfix queue info
+        # and smartctl info
+        # and info about running domains
         cat >>/etc/sudoers <<EOF
 ### BEGIN xvm-munin-config
 munin ALL=(postfix) SETENV: NOPASSWD: /etc/munin/plugins/postfix_mailqueue
 munin ALL=(munin) SETENV: NOPASSWD: ALL
-munin ALL=(root) SETENV: NOPASSWD: /etc/munin/plugins/hddtemp_smartctl , /etc/munin/plugins/smart_*
+munin ALL=(root) SETENV: NOPASSWD: /etc/munin/plugins/hddtemp_smartctl , /etc/munin/plugins/smart_* , /etc/munin/plugins/xen_cpu
 ### END xvm-munin-config
 EOF
         
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
+
+	(cd /etc/munin/plugins &&
+	    for i in smart_*; do
+		if smartctl -i "/dev/${i#smart_}" | grep Device | grep EQLOGIC; then
+		    rm -v "$i";
+		fi
+	    done)
         
         invoke-rc.d munin-node restart
     ;;