File open-iscsi-no-pid-file of Package open-iscsi

commit 9d9425eb31ecc3d1501da83e8e9becaec441b4c7
Author: Hannes Reinecke <hare@suse.de>
Date:   Thu Nov 20 15:40:10 2008 +0100

    Do not use a pid file for start scripts
    
    open-iscsi works perfectly without a pid file. So don't create one.
    
    Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/etc/initd/boot.suse b/etc/initd/boot.suse
index 3e93cad..83875e2 100644
--- a/etc/initd/boot.suse
+++ b/etc/initd/boot.suse
@@ -17,10 +17,9 @@
 ### END INIT INFO
 
 ISCSIADM=/sbin/iscsiadm
-PID_FILE=/var/run/iscsi.pid
 CONFIG_FILE=/etc/iscsid.conf
 DAEMON=/sbin/iscsid
-ARGS="-c $CONFIG_FILE -p $PID_FILE"
+ARGS="-c $CONFIG_FILE"
 
 # Source LSB init functions
 . /etc/rc.status
diff --git a/etc/initd/initd.suse b/etc/initd/initd.suse
index 69b681b..11ee4d2 100644
--- a/etc/initd/initd.suse
+++ b/etc/initd/initd.suse
@@ -16,11 +16,10 @@
 #                    
 ### END INIT INFO
 
-PID_FILE=/var/run/iscsi.pid
 CONFIG_FILE=/etc/iscsi/iscsid.conf
 DAEMON=/sbin/iscsid
 ISCSIADM=/sbin/iscsiadm
-ARGS="-c $CONFIG_FILE -p $PID_FILE"
+ARGS="-c $CONFIG_FILE -n"
 
 # Source LSB init functions
 . /etc/rc.status
@@ -105,7 +104,6 @@ iscsi_list_all_nodes()
 
 case "$1" in
     start)
-	[ ! -d /var/lib/iscsi ] && mkdir -p /var/lib/iscsi
 	if checkproc $DAEMON ; then
 	    RETVAL=0
 	else
@@ -122,15 +120,14 @@ case "$1" in
 	;;
     stop)
 	iscsi_umount_all_luns
+	echo -n "Stopping iSCSI initiator service: "
 	if iscsi_logout_all_nodes ; then
 	    killproc -KILL $DAEMON
 	    RETVAL=$?
 	else
 	    RETVAL=1
 	fi
-	echo -n "Stopping iSCSI initiator service: "
 	if [ "$RETVAL" == "0" ]; then
-	    rm -f $PID_FILE
 	    status=0
 	    modprobe -r iscsi_tcp
 	    if [ "$?" -ne "0" -a "$?" -ne "1" ]; then