SOURCES: kbd.init - added try-restart - [force-]reload should do nothing if...
qboosh
qboosh at pld-linux.org
Fri Dec 5 22:05:54 CET 2008
Author: qboosh Date: Fri Dec 5 21:05:54 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added try-restart
- [force-]reload should do nothing if service not started
---- Files affected:
SOURCES:
kbd.init (1.34 -> 1.35)
---- Diffs:
================================================================
Index: SOURCES/kbd.init
diff -u SOURCES/kbd.init:1.34 SOURCES/kbd.init:1.35
--- SOURCES/kbd.init:1.34 Sun Aug 17 16:52:10 2008
+++ SOURCES/kbd.init Fri Dec 5 22:05:48 2008
@@ -132,15 +132,28 @@
touch /var/lock/subsys/console
}
+RETVAL=0
case "$1" in
start)
if [ ! -f /var/lock/subsys/console ]; then
start
fi
;;
- restart|reload|force-reload)
+ restart)
start
;;
+ try-restart)
+ if [ -f /var/lock/subsys/console ]; then
+ start
+ fi
+ ;;
+ reload|force-reload)
+ if [ -f /var/lock/subsys/console ]; then
+ start
+ else
+ RETVAL=7
+ fi
+ ;;
stop)
if [ -f /var/lock/subsys/console ]; then
run_cmd "Setting terminals to default values" /usr/bin/setterm -default
@@ -151,8 +164,8 @@
/usr/bin/setleds
;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
exit 3
esac
-exit 0
+exit $RETVAL
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kbd.init?r1=1.34&r2=1.35&f=u
More information about the pld-cvs-commit
mailing list