Commit c1671c0e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Use configure's paths in the init script example.

Reviewed-by: schreiberal
parent bd205d0e
EXTRA_DIST = ganeti.initd ganeti.cron
nodist_bin_SCRIPTS = ganeti.initd
EXTRA_DIST = ganeti.initd.in ganeti.cron
CLEANFILES = $(nodist_bin_SCRIPTS)
ganeti.initd: ganeti.initd.in
sed \
-e "s#@PREFIX@#$(prefix)#g" \
-e "s#@SYSCONFDIR@#$(sysconfdir)#g" \
-e "s#@LOCALSTATEDIR@#$(localstatedir)#g" \
< $< > $@
#! /bin/sh
#!/bin/sh
# ganeti node daemon starter script
# based on skeleton from Debian GNU/Linux
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
NODED=/usr/local/sbin/ganeti-noded
MASTER=/usr/local/sbin/ganeti-master
NAME=ganeti-noded
SCRIPTNAME=/etc/init.d/ganeti
DESC="Ganeti cluster"
NAME=ganeti-noded
NODED=@PREFIX@/sbin/ganeti-noded
MASTER=@PREFIX@/sbin/ganeti-master
SCRIPTNAME=@SYSCONFDIR@/init.d/ganeti
test -f $NODED || exit 0
. /lib/lsb/init-functions
check_config() {
for fname in /var/lib/ganeti/ssconf_node_pass /var/lib/ganeti/server.pem; do
for fname in \
"@LOCALSTATEDIR@/lib/ganeti/ssconf_node_pass" \
"@LOCALSTATEDIR@/lib/ganeti/server.pem"
do
if ! [ -f "$fname" ]; then
log_end_msg 0
log_warning_msg "Config $fname not there, will not run."
......
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