From: Arne Fitzenreiter Date: Wed, 21 Jan 2015 12:05:12 +0000 (+0100) Subject: collectd: fix disable swap plugin if no swap exist. X-Git-Tag: v2.17-core87~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=893ef99ed42b905c9c4500ab75604abd00f70ab5;p=ipfire-2.x.git collectd: fix disable swap plugin if no swap exist. --- diff --git a/config/rootfiles/core/86/filelists/files b/config/rootfiles/core/86/filelists/files index d4622faeb6..3745701e5d 100644 --- a/config/rootfiles/core/86/filelists/files +++ b/config/rootfiles/core/86/filelists/files @@ -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 diff --git a/src/initscripts/init.d/collectd b/src/initscripts/init.d/collectd index 7de005eb41..c0ca12fe4f 100644 --- a/src/initscripts/init.d/collectd +++ b/src/initscripts/init.d/collectd @@ -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