diff options
author | Martin Poole <mpoole@redhat.com> | 2011-04-19 16:40:22 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-04-19 16:43:20 +0200 |
commit | 1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497 (patch) | |
tree | 9e52442350ad94fe86f0d91260643de6ec2bbe77 | |
parent | 3e5ad8ebb33c85a658bd3a310e0eb4d61d68d3df (diff) | |
download | initscripts-1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497.tar initscripts-1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497.tar.gz initscripts-1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497.tar.bz2 initscripts-1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497.tar.xz initscripts-1d1fb1e65b45b45b4fa5b38205bb1f0f04bf8497.zip |
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 <harald@redhat.com>
Commited-by: Harald Hoyer <harald@redhat.com>
-rwxr-xr-x | rc.d/init.d/network | 2 |
1 files changed, 1 insertions, 1 deletions
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 |