From 4bb1d33ce69b6d105d176e9c42cc6f8afa0ae273 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Apr 25 2008 18:13:15 +0000 Subject: Fix up from 437522: logout sessions that are running if not using iscsi boot during shutdown. --- diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index d904abf..23bf382 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -1,7 +1,7 @@ Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.2.0.868 -Release: 0.6%{?dist} +Release: 0.7%{?dist} Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-868-test1.tar.gz Source1: iscsid.init Source2: iscsidevs.init @@ -124,6 +124,9 @@ fi %changelog +* Fri Apr 25 2008 Mike Christie - 6.2.0.868-0.7 +- 437522 log out sessions that are not used for root during "iscsi stop". + * Fri Apr 4 2008 Mike Christie - 6.2.0.868-0.6 - Rebase to RHEL5 to bring in bug fixes. - 437522 iscsi startup does not need to modify with network startup. diff --git a/iscsid.init b/iscsid.init index 9248ce6..24a35e7 100755 --- a/iscsid.init +++ b/iscsid.init @@ -72,15 +72,6 @@ stop() return fi - # If this is a final shutdown/halt, do nothing since - # we may need iscsid for as long as possible (halt script kills - # us at the last second) - if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then - rm -f /var/lock/subsys/iscsid - success - return - fi - # don't turn off iscsi if root is possibly on a iscsi disk rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab) if [[ "$rootopts" =~ "_netdev" ]] ; then diff --git a/iscsidevs.init b/iscsidevs.init index 808b64e..27b5f5a 100755 --- a/iscsidevs.init +++ b/iscsidevs.init @@ -70,16 +70,6 @@ stop() return fi - # If this is a final shutdown/halt, do nothing since - # lvm/dm, md, power path, etc do not always handle this nicely. - # The kernel will do the right thing and shutdown devices (send - # cache syncs, start_stops, etc) that need it. - if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then - rm -f /var/lock/subsys/iscsi - success - return - fi - # don't turn off iscsi if root is possibly on a iscsi disk rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab) if [[ "$rootopts" =~ "_netdev" ]] ; then