From: Peter Müller Date: Wed, 13 Apr 2022 09:22:58 +0000 (+0000) Subject: Silence STDERR when calling 'sensors-detect' in collectd initscript X-Git-Tag: v2.27-core167~2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5b091fb1085ebdf2000fb0c1006afc1e1a11335;p=ipfire-2.x.git Silence STDERR when calling 'sensors-detect' in collectd initscript https://lists.ipfire.org/pipermail/development/2022-April/013189.html Signed-off-by: Peter Müller --- diff --git a/src/initscripts/system/collectd b/src/initscripts/system/collectd index 6c58ac3a62..bb8a2f54f4 100644 --- a/src/initscripts/system/collectd +++ b/src/initscripts/system/collectd @@ -27,7 +27,7 @@ eval $(/usr/local/bin/readhash /var/ipfire/main/settings) scan_for_sensors() { touch /var/lock/sensors_search # pre scan and try to load modules - "yes" | /usr/sbin/sensors-detect > /dev/null + "yes" | /usr/sbin/sensors-detect > /dev/null 2>&1 if [ -e /etc/sysconfig/lm_sensors ]; then # Module load @@ -38,7 +38,7 @@ scan_for_sensors() { fi # Final scan - "yes" | /usr/sbin/sensors-detect > /dev/null + "yes" | /usr/sbin/sensors-detect > /dev/null 2>&1 if [ ! -e /etc/sysconfig/lm_sensors ]; then echo "#No Sensors detected " > /etc/sysconfig/lm_sensors