]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
collectd: fix disable swap plugin if no swap exist.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 21 Jan 2015 12:05:12 +0000 (13:05 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 21 Jan 2015 12:16:09 +0000 (13:16 +0100)
config/rootfiles/core/86/filelists/files
src/initscripts/init.d/collectd

index d4622faeb651a27bc69b2c30f2303f73a6b6898b..3745701e5dc65b507ebea8f3439b5dc4ec54cc97 100644 (file)
@@ -1,6 +1,7 @@
 etc/system-release
 etc/issue
 etc/modprobe.d/btmrvl_sdio.conf
+etc/rc.d/init.d/collectd
 etc/rc.d/init.d/leds
 opt/pakfire/etc/pakfire.conf
 usr/lib/firewall/rules.pl
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