From 1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497 Mon Sep 17 00:00:00 2001 From: Martin Poole Date: Tue, 19 Apr 2011 16:40:22 +0200 Subject: Avoid noisy output if no iscsid check during shutdown or reboot .... Shutting down system logger: find: /sys/class/iscsi_session/: No such file or directory Shutting down interface eth0: ... Reviewed-by: Harald Hoyer Commited-by: Harald Hoyer --- rc.d/init.d/network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.d/init.d/network b/rc.d/init.d/network index ee39c099..e8c94409 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -202,7 +202,7 @@ case "$1" in # If this is a final shutdown/halt and there is an iSCSI session, # do not stop the service. if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then - if [ `find /sys/class/iscsi_session/ -mindepth 1 -maxdepth 1 -type d | wc -l` -ge 1 ]; then + if [ $(ls -d /sys/class/iscsi_session/*/. 2>/dev/null | wc -l) -ge 1 ]; then exit 1 fi fi -- cgit v1.2.1