From: Siraaj Khandkar Date: Wed, 6 Mar 2019 19:43:22 +0000 (-0500) Subject: Ignore /sys/classa/net/$iface/carrier access errors X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=fca6896b9e697c9b74cda916f15cbbbc1e55865e;p=khatus.git Ignore /sys/classa/net/$iface/carrier access errors which begin when interface is disabled. --- diff --git a/x2/src/bash/exe/khatus_sensor_net_carrier.sh b/x2/src/bash/exe/khatus_sensor_net_carrier.sh index 38597d0..3d463d6 100644 --- a/x2/src/bash/exe/khatus_sensor_net_carrier.sh +++ b/x2/src/bash/exe/khatus_sensor_net_carrier.sh @@ -2,5 +2,5 @@ for interface in $(ls /sys/class/net) do - printf "%s|%d\n" $interface $(cat /sys/class/net/$interface/carrier) + printf "%s|%d\n" $interface $(cat /sys/class/net/$interface/carrier 2> /dev/null) done