From ee518629b82691b2084b31aeef13692e48f4436f Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Wed, 13 Oct 2010 15:34:09 +0200 Subject: network: don't turn of net on shutdown if iscsi is running https://bugzilla.redhat.com/show_bug.cgi?id=583218#c37 --- rc.d/init.d/network | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.1