--- open-iscsi-2.0-865/etc/initd/initd.suse	2007/12/06 07:55:12	1.9
+++ open-iscsi-2.0-865/etc/initd/initd.suse	2007/12/06 10:38:32
@@ -34,19 +34,26 @@
 iscsi_login_all_nodes()
 {
 	echo -n "Setting up iSCSI targets: "
-	$ISCSIADM -m node --loginall=automatic
+	$ISCSIADM -m node --loginall=automatic 2> /dev/null
+	if [ $? == 19 ] ; then
+	    rc_failed 6
+	fi
 	rc_status -v
 }
 
 iscsi_logout_all_nodes()
 {
+	echo -n "Closing all iSCSI connections: "
 	# Logout from all active sessions
-	if $ISCSIADM -m node --logoutall=all ; then
-		rc_status -v
-	else
-		RETVAL=$?
+	if ! $ISCSIADM -m node --logoutall=all 2> /dev/null; then
+		if [ $? == 19 ] ; then
+		    RETVAL=6
+		else
+		    RETVAL=1
+		fi
 		rc_failed $RETVAL
 	fi
+	rc_status -v
 
 	# Not sure whether this is still needed
 	sleep 1
