Be more cautious about removing munin plugins 0.0.7
authorQuentin Smith <quentin@mit.edu>
Sat, 14 Mar 2009 15:39:26 +0000 (11:39 -0400)
committerQuentin Smith <quentin@mit.edu>
Sat, 14 Mar 2009 15:39:26 +0000 (11:39 -0400)
svn path=/trunk/packages/xvm-munin-config/; revision=2248

debian/xvm-munin-host-config.postinst

index 1f64371..fc2de88 100755 (executable)
@@ -37,10 +37,10 @@ EOF
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
 
-       (cd /etc/munin/plugins;
+       (cd /etc/munin/plugins &&
            for i in smart_*; do
-               if smartctl -i /dev/${i#smart_} | grep Device | grep EQLOGIC; then
-                   rm -v $i;
+               if smartctl -i "/dev/${i#smart_}" | grep Device | grep EQLOGIC; then
+                   rm -v "$i";
                fi
            done)