SOURCES: linux-iscsi.init - back to 4.x on head

arekm arekm at pld-linux.org
Wed Jul 6 13:28:55 CEST 2005


Author: arekm                        Date: Wed Jul  6 11:28:55 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- back to 4.x on head

---- Files affected:
SOURCES:
   linux-iscsi.init (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/linux-iscsi.init
diff -u SOURCES/linux-iscsi.init:1.2 SOURCES/linux-iscsi.init:1.3
--- SOURCES/linux-iscsi.init:1.2	Thu Jun  2 14:17:34 2005
+++ SOURCES/linux-iscsi.init	Wed Jul  6 13:28:50 2005
@@ -21,7 +21,7 @@
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
 	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
-		msg_network_down "iSCSI Initiator"
+		msg_network_down iscsi
 		exit 1
 	fi
 else
@@ -36,22 +36,40 @@
   start)
 	# Start daemons.
 	if [ ! -f /var/lock/subsys/iscsid ]; then
-		msg_starting "iSCSI Initiator"
+		msg_starting iscsid
 		daemon iscsid
 		RETVAL=$?
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/iscsid
+		if [ -s /etc/fstab.iscsi ]; then
+		    sleep 2
+		    msg_starting "Mounting/fscking iscsi devices"
+		    daemon iscsi-mountall
+		fi
 	else
-		msg_already_running "iSCSI Initiator"
+		msg_already_running iscsid
 	fi
 	;;
   stop)
 	# Stop daemons.
 	if [ -f /var/lock/subsys/iscsid ]; then
-		msg_stopping "iSCSI Initiator"
+	    	if [ -f /sys/class/scsi_host/iscsi/connfailtimeout ]; then
+			echo "$ISCSI_CONNFAILTIMEOUT" > /sys/class/scsi_host/iscsi/connfailtimeout
+		fi
+		if [ -f /sys/class/scsi_host/iscsi/diskcommandtimeout ]; then
+			echo "$ISCSI_DISKCOMMANDTIMEOUT" > /sys/class/scsi_host/iscsi/diskcommandtimeout
+		fi
+	    	sync
+		sleep 3
+		msg_stopping "Umounting iscsi devices"
+		daemon iscsi-umountall -t -k
+		msg_stopping iscsid
 		killproc iscsid
+		if [ -f /sys/class/scsi_host/iscsi/shutdown ] ; then
+		    echo  > /sys/class/scsi_host/iscsi/shutdown
+		fi
 		rm -f /var/lock/subsys/iscsid >/dev/null 2>&1
 	else
-		msg_not_running "iSCSI Initiator"
+		msg_not_running iscsid
 	fi	
 	;;
   restart|force-reload)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/linux-iscsi.init?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list