SOURCES: hotplug.init - force-reload is not supposed to start serv...
qboosh
qboosh at pld-linux.org
Thu Nov 29 22:00:30 CET 2007
Author: qboosh Date: Thu Nov 29 21:00:30 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- force-reload is not supposed to start service if not running
- added try-reload action (LSB 3.1)
---- Files affected:
SOURCES:
hotplug.init (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SOURCES/hotplug.init
diff -u SOURCES/hotplug.init:1.9 SOURCES/hotplug.init:1.10
--- SOURCES/hotplug.init:1.9 Sun Oct 1 23:37:13 2006
+++ SOURCES/hotplug.init Thu Nov 29 22:00:25 2007
@@ -45,6 +45,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/hotplug ]; then
+ stop
+ start
+ else
+ msg_not_running hotplug
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -54,6 +64,16 @@
stop)
stop
;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
for RC in /etc/hotplug/*.rc; do
$RC status
@@ -61,12 +81,8 @@
[ $RETVAL -eq 0 ] && RETVAL=$RET
done
;;
- restart|force-reload)
- stop
- start
- ;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/hotplug.init?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list