Commit b81ef751 authored by Iustin Pop's avatar Iustin Pop
Browse files

Create /var/run/ganeti before noded startup

The /var/run directory can be a tmpfs mount, so even if we make it at
install time (or include it in the package) it can go away. Therefore,
test for its existence and create it in the startup script.

Reviewed-by: imsnah
parent d5a446f2
......@@ -17,6 +17,7 @@ NAME=ganeti-noded
NODED=@PREFIX@/sbin/ganeti-noded
MASTER=@PREFIX@/sbin/ganeti-master
SCRIPTNAME=@SYSCONFDIR@/init.d/ganeti
RUNDIR="@LOCALSTATEDIR@/run/ganeti"
test -f $NODED || exit 0
......@@ -55,6 +56,7 @@ case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
check_config
test -e "$RUNDIR" || mkdir -p "$RUNDIR"
if start-stop-daemon --start --quiet --exec $NODED; then
log_end_msg 0
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment