packages: multipath-tools/multipathd.init - add try-restart; full path to d...
glen
glen at pld-linux.org
Thu Jun 11 23:26:03 CEST 2009
Author: glen Date: Thu Jun 11 21:26:03 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- add try-restart; full path to daemon
---- Files affected:
packages/multipath-tools:
multipathd.init (1.5 -> 1.6)
---- Diffs:
================================================================
Index: packages/multipath-tools/multipathd.init
diff -u packages/multipath-tools/multipathd.init:1.5 packages/multipath-tools/multipathd.init:1.6
--- packages/multipath-tools/multipathd.init:1.5 Fri Oct 26 15:01:57 2007
+++ packages/multipath-tools/multipathd.init Thu Jun 11 23:25:58 2009
@@ -16,49 +16,64 @@
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/multipathd ]; then
- msg_starting multipathd
+ msg_starting "multipath daemon"
modprobe dm-multipath
- daemon multipathd
+ daemon /sbin/multipathd
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/multipathd
else
- msg_already_running multipathd
+ msg_already_running "multipath daemon"
fi
}
stop() {
if [ -f /var/lock/subsys/multipathd ]; then
# Stop daemons.
- msg_stopping multipathd
+ msg_stopping "multipath daemon"
killproc --pidfile multipathd.pid multipathd -TERM
rm -f /var/lock/subsys/multipathd
else
- msg_not_running multipathd
+ msg_not_running "multipath daemon"
fi
}
+condrestart() {
+ if [ ! -f /var/lock/subsys/multipathd ]; then
+ msg_not_running "multipath daemon"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
+
RETVAL=0
# See how we were called.
case "$1" in
start)
start
;;
-
stop)
stop
;;
-
- restart|force-reload)
+ restart)
stop
start
;;
-
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status multipathd
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|status|restart|force-reload}"
+ msg_usage "$0 {start|stop|status|restart|try-restart|force-reload}"
exit 3
;;
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/multipath-tools/multipathd.init?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list