aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2010-10-13 15:34:09 +0200
committerHarald Hoyer <harald@redhat.com>2010-10-13 15:34:09 +0200
commitee518629b82691b2084b31aeef13692e48f4436f (patch)
tree4df60cddfb3d1695ee7820041e1b92a49ea8a419
parent6875b423a1391228680f8b51c3379bb586a570c9 (diff)
downloadinitscripts-ee518629b82691b2084b31aeef13692e48f4436f.tar
initscripts-ee518629b82691b2084b31aeef13692e48f4436f.tar.gz
initscripts-ee518629b82691b2084b31aeef13692e48f4436f.tar.bz2
initscripts-ee518629b82691b2084b31aeef13692e48f4436f.tar.xz
initscripts-ee518629b82691b2084b31aeef13692e48f4436f.zip
network: don't turn of net on shutdown if iscsi is running
https://bugzilla.redhat.com/show_bug.cgi?id=583218#c37
-rwxr-xr-xrc.d/init.d/network8
1 files changed, 8 insertions, 0 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 4f917753..ba169131 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -196,6 +196,14 @@ case "$1" in
/etc/init.d/netfs stop
fi
fi
+
+ # 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
+ exit 1
+ fi
+ fi
# IPv6 hook (pre IPv4 stop)
if [ "$NETWORKING_IPV6" = "yes" ]; then