rpms/iscsitarget/F-11 iscsitarget-1.4.18-initscript.patch,NONE,1.1

Lubomir Rintel lkundrak at rpmfusion.org
Sun Nov 1 14:59:01 CET 2009


Author: lkundrak

Update of /cvs/free/rpms/iscsitarget/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv12622/F-11

Added Files:
	iscsitarget-1.4.18-initscript.patch 
Log Message:
Add forgotten patch file

iscsitarget-1.4.18-initscript.patch:

--- NEW FILE iscsitarget-1.4.18-initscript.patch ---
diff -up iscsitarget-1.4.18/etc/initd/initd.redhat.initscript iscsitarget-1.4.18/etc/initd/initd.redhat
--- iscsitarget-1.4.18/etc/initd/initd.redhat.initscript	2009-09-21 20:28:14.000000000 +0200
+++ iscsitarget-1.4.18/etc/initd/initd.redhat	2009-11-01 14:29:57.074823142 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # chkconfig: - 39 35
 # description: Starts and stops the iSCSI target
@@ -6,7 +6,14 @@
 # pidfile: /var/run/ietd.pid
 # config:  /etc/ietd.conf
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+### BEGIN INIT INFO
+# Provides: iscsi-target
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Short-Description: start and stop ietd
+# Description: Starts and stops the iSCSI target
+### END INIT INFO
+
 OPTIONS=""
 
 # Source function library.
@@ -27,11 +34,15 @@ RETVAL=0
 start()
 {
 	echo -n "Starting iSCSI Target: "
-	modprobe -q crc32c
+	# 2> /dev/null for kernels where regular crc32c is build in, as there
+	# modprobe will sometimes pick a CPU specific one which will then fail
+	# if not loaded on the right CPU, ie crc32c_intel on an amd64
+	modprobe crc32c 2> /dev/null
 	modprobe iscsi_trgt
 	daemon /usr/sbin/ietd $OPTIONS
 	RETVAL=$?
 	if [ $RETVAL -eq 0 ]; then
+		touch /var/lock/subsys/iscsi-target
 		echo_success
 	else
 		echo_failure
@@ -48,6 +59,7 @@ stop()
 	modprobe -r iscsi_trgt
 	RETVAL=$?
 	if [ $RETVAL -eq 0 ]; then
+		rm -f /var/lock/subsys/iscsi-target
 		echo_success
 	else
 		echo_failure
@@ -71,6 +83,16 @@ condrestart()
 	fi
 }
 
+try-restart()
+{
+	condrestart
+}
+
+force-reload()
+{
+	try-restart
+}
+
 status()
 {
 	PID=`pidofproc ietd`
@@ -99,7 +121,7 @@ case "$1" in
         status
         ;;
   *)
-        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+	echo $"Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
         exit 1
 esac
 



More information about the rpmfusion-commits mailing list