[Pkg-sysvinit-devel] Bug#696910: initscripts: cannot shut down when / on network - iscsi

Ferenc Wagner wferi at niif.hu
Tue Jun 4 14:14:18 UTC 2013


Hi,

I was also bitten by this issue; Dear Maintainer, please consider fixing
it!  I applied to following patches to the reboot and halt scripts,
based on similar checks in the networking and open-iscsi init scripts:

--- /etc/init.d/reboot.orig	2012-11-20 12:03:28.737794685 +0100
+++ /etc/init.d/reboot	2012-11-20 12:07:20.209804174 +0100
@@ -17,7 +17,11 @@
 	# Message should end with a newline since kFreeBSD may
 	# print more stuff (see #323749)
 	log_action_msg "Will now restart"
-	reboot -d -f -i
+	netdown="-i"
+	if [ -e /etc/iscsi/iscsi.initramfs ]; then
+		netdown=""
+	fi
+	reboot -d -f $netdown
 }
 
 case "$1" in
--- /etc/init.d/halt.orig	2012-11-20 12:03:25.237794541 +0100
+++ /etc/init.d/halt	2012-11-20 12:05:23.209799378 +0100
@@ -53,9 +53,9 @@
 	fi
 
 	# Make it possible to not shut down network interfaces,
-	# needed to use wake-on-lan
+	# needed to use wake-on-lan or to synchronize the iSCSI cache
 	netdown="-i"
-	if [ "$NETDOWN" = "no" ]; then
+	if [ "$NETDOWN" = "no" ] || [ -e /etc/iscsi/iscsi.initramfs ]; then
 		netdown=""
 	fi
 
-- 
Thanks,
Feri.



More information about the Pkg-sysvinit-devel mailing list