Minor tweaks/improvements to the salt-minion SysV init script.

* Test "reload" before probing minion configuration
* change indent
This commit is contained in:
Thayne Harbaugh 2016-07-28 12:12:45 -06:00
parent b09aacf185
commit aab8e23975

View File

@ -252,11 +252,15 @@ main() {
# Pre-filter for unhandled commands
case "$1" in
(start|stop|status|restart|condrestart|try-restart|reload) ;;
(start|stop|status|restart|condrestart|try-restart) ;;
(reload)
echo "Can't reload $SERVICE - you must restart it"
exit 3
;;
(*)
echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload}"
exit 2
;;
echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload}"
exit 2
;;
esac
while read MINION_USER CONFIG_DIR; do
@ -300,10 +304,6 @@ main() {
start || RETVAL=$?
fi
;;
(reload)
echo "Can't reload $SERVICE configuration - you must restart it"
RETVAL=3
;;
(*)
echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload}"
RETVAL=2