projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LUSetInstanceParams: nic parameters
[ganeti-local]
/
doc
/
examples
/
ganeti.initd.in
diff --git
a/doc/examples/ganeti.initd.in
b/doc/examples/ganeti.initd.in
index
8460216
..
b346530
100644
(file)
--- a/
doc/examples/ganeti.initd.in
+++ b/
doc/examples/ganeti.initd.in
@@
-16,17
+16,22
@@
DESC="Ganeti cluster"
GANETIRUNDIR="@LOCALSTATEDIR@/run/ganeti"
GANETIRUNDIR="@LOCALSTATEDIR@/run/ganeti"
+GANETI_DEFAULTS_FILE="@SYSCONFDIR@/default/ganeti"
+
NODED_NAME="ganeti-noded"
NODED="@PREFIX@/sbin/${NODED_NAME}"
NODED_PID="${GANETIRUNDIR}/${NODED_NAME}.pid"
NODED_NAME="ganeti-noded"
NODED="@PREFIX@/sbin/${NODED_NAME}"
NODED_PID="${GANETIRUNDIR}/${NODED_NAME}.pid"
+NODED_ARGS=""
MASTERD_NAME="ganeti-masterd"
MASTERD="@PREFIX@/sbin/${MASTERD_NAME}"
MASTERD_PID="${GANETIRUNDIR}/${MASTERD_NAME}.pid"
MASTERD_NAME="ganeti-masterd"
MASTERD="@PREFIX@/sbin/${MASTERD_NAME}"
MASTERD_PID="${GANETIRUNDIR}/${MASTERD_NAME}.pid"
+MASTERD_ARGS=""
RAPI_NAME="ganeti-rapi"
RAPI="@PREFIX@/sbin/${RAPI_NAME}"
RAPI_PID="${GANETIRUNDIR}/${RAPI_NAME}.pid"
RAPI_NAME="ganeti-rapi"
RAPI="@PREFIX@/sbin/${RAPI_NAME}"
RAPI_PID="${GANETIRUNDIR}/${RAPI_NAME}.pid"
+RAPI_ARGS=""
SCRIPTNAME="@SYSCONFDIR@/init.d/ganeti"
SCRIPTNAME="@SYSCONFDIR@/init.d/ganeti"
@@
-34,6
+39,10
@@
test -f $NODED || exit 0
. /lib/lsb/init-functions
. /lib/lsb/init-functions
+if [ -s $GANETI_DEFAULTS_FILE ]; then
+ . $GANETI_DEFAULTS_FILE
+fi
+
check_config() {
for fname in \
"@LOCALSTATEDIR@/lib/ganeti/server.pem"
check_config() {
for fname in \
"@LOCALSTATEDIR@/lib/ganeti/server.pem"
@@
-63,8
+72,11
@@
check_exitcode() {
start_action() {
# called as start_action daemon pidfile
start_action() {
# called as start_action daemon pidfile
- log_action_begin_msg "$1"
- start-stop-daemon --start --quiet --exec "$1" --pidfile "$2"
+ local daemon="$1"; shift
+ local pidfile="$1"; shift
+ log_action_begin_msg "$daemon"
+ start-stop-daemon --start --quiet --exec "$daemon" --pidfile "$pidfile" \
+ -- "$@"
check_exitcode $?
}
check_exitcode $?
}
@@
-81,16
+93,16
@@
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
check_config
start)
log_daemon_msg "Starting $DESC" "$NAME"
check_config
- start_action $NODED $NODED_PID
- start_action $MASTERD $MASTERD_PID
- start_action $RAPI $RAPI_PID
- ;;
+ start_action $NODED $NODED_PID $NODED_ARGS
+ start_action $MASTERD $MASTERD_PID $MASTERD_ARGS
+ start_action $RAPI $RAPI_PID $RAPI_ARGS
+ ;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
stop_action $RAPI $RAPI_PID
stop_action $MASTERD $MASTERD_PID
stop_action $NODED $NODED_PID
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
stop_action $RAPI $RAPI_PID
stop_action $MASTERD $MASTERD_PID
stop_action $NODED $NODED_PID
- ;;
+ ;;
restart|force-reload)
log_daemon_msg "Reloading $DESC"
stop_action $RAPI $RAPI_PID
restart|force-reload)
log_daemon_msg "Reloading $DESC"
stop_action $RAPI $RAPI_PID
@@
-100,11
+112,11
@@
case "$1" in
start_action $NODED $NODED_PID
start_action $MASTERD $MASTERD_PID
start_action $RAPI $RAPI_PID
start_action $NODED $NODED_PID
start_action $MASTERD $MASTERD_PID
start_action $RAPI $RAPI_PID
- ;;
+ ;;
*)
log_success_msg "Usage: $SCRIPTNAME {start|stop|force-reload|restart}"
exit 1
*)
log_success_msg "Usage: $SCRIPTNAME {start|stop|force-reload|restart}"
exit 1
- ;;
+ ;;
esac
exit 0
esac
exit 0