packages: policyd/policyd.init - add try-restart, fix force-reload
glen
glen at pld-linux.org
Mon Jan 3 13:32:57 CET 2011
Author: glen Date: Mon Jan 3 12:32:57 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- add try-restart, fix force-reload
---- Files affected:
packages/policyd:
policyd.init (1.9 -> 1.10)
---- Diffs:
================================================================
Index: packages/policyd/policyd.init
diff -u packages/policyd/policyd.init:1.9 packages/policyd/policyd.init:1.10
--- packages/policyd/policyd.init:1.9 Mon Jan 3 13:31:39 2011
+++ packages/policyd/policyd.init Mon Jan 3 13:32:52 2011
@@ -57,6 +57,17 @@
rm -f /var/lock/subsys/policyd
}
+condrestart() {
+ if [ ! -f /var/lock/subsys/<service> ]; then
+ msg_not_running "PolicyD"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
init() {
cat <<'EOF'
@@ -113,10 +124,16 @@
stop)
stop
;;
- restart|force-reload)
+ restart)
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
cleanup|cron)
cleanup
;;
@@ -128,7 +145,7 @@
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|cron|init|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|cron|init|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/policyd/policyd.init?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list