SOURCES: dhcp.init - added try-restart and force-reload options
qboosh
qboosh at pld-linux.org
Tue Dec 25 13:18:55 CET 2007
Author: qboosh Date: Tue Dec 25 12:18:55 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added try-restart and force-reload options
---- Files affected:
SOURCES:
dhcp.init (1.18 -> 1.19)
---- Diffs:
================================================================
Index: SOURCES/dhcp.init
diff -u SOURCES/dhcp.init:1.18 SOURCES/dhcp.init:1.19
--- SOURCES/dhcp.init:1.18 Mon Jan 22 18:40:34 2007
+++ SOURCES/dhcp.init Tue Dec 25 13:18:50 2007
@@ -57,6 +57,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/dhcpd ]; then
+ stop
+ start
+ else
+ msg_not_running dhcpd
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -72,6 +82,14 @@
stop
start
;;
+ try-restart)
+ checkconfig || exit 1
+ condrestart 0
+ ;;
+ force-reload)
+ checkconfig || exit 1
+ condrestart 7
+ ;;
checkconfig)
checkconfig
;;
@@ -80,7 +98,7 @@
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|checkconfig|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|checkconfig|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dhcp.init?r1=1.18&r2=1.19&f=u
More information about the pld-cvs-commit
mailing list