From fca6896b9e697c9b74cda916f15cbbbc1e55865e Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 6 Mar 2019 14:43:22 -0500 Subject: [PATCH] Ignore /sys/classa/net/$iface/carrier access errors which begin when interface is disabled. --- x2/src/bash/exe/khatus_sensor_net_carrier.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1