SOURCES: open-iscsi.init - fixed force-reload, added try-restart
qboosh
qboosh at pld-linux.org
Tue Oct 14 19:17:33 CEST 2008
Author: qboosh Date: Tue Oct 14 17:17:32 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fixed force-reload, added try-restart
---- Files affected:
SOURCES:
open-iscsi.init (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SOURCES/open-iscsi.init
diff -u SOURCES/open-iscsi.init:1.5 SOURCES/open-iscsi.init:1.6
--- SOURCES/open-iscsi.init:1.5 Tue Oct 14 09:39:15 2008
+++ SOURCES/open-iscsi.init Tue Oct 14 19:17:27 2008
@@ -34,7 +34,7 @@
daemon iscsid -u iscsi -g iscsi
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
- touch /var/lock/subsys/iscsid
+ touch /var/lock/subsys/iscsid
run_cmd "Logging into iSCSI targets" iscsiadm -m node -L automatic
fi
else
@@ -54,24 +54,40 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/iscsid ]; then
+ stop
+ start
+ else
+ msg_not_running "iSCSI Initiator"
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
case "$1" in
start)
start
;;
stop)
- stop
+ stop
;;
- restart|force-reload)
+ restart)
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status iscsid
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac
exit $RETVAL
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/open-iscsi.init?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list