]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/collectd
collectd: fix disable swap plugin if no swap exist.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / collectd
index 7de005eb41dd56e37be8e9491ce9474b9f9a7fc7..c0ca12fe4f79abd1323829cb17f5a09c31684f9d 100644 (file)
@@ -84,7 +84,7 @@ case "$1" in
                fi
 
                # Enable swap plugin if swap found
-               if [ "$(swapon -s | wc -l)" == "1" ]; then
+               if [ "$(swapon -s | wc -l)" == "0" ]; then
                        sed -i -e "s|^LoadPlugin swap|#LoadPlugin swap|g" /etc/collectd.conf
                else
                        sed -i -e "s|^#LoadPlugin swap|LoadPlugin swap|g" /etc/collectd.conf