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

daemon-util: Generate daemon path in separate function


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 49d43244
......@@ -46,6 +46,10 @@ _daemon_pidfile() {
echo "@LOCALSTATEDIR@/run/ganeti/$1.pid"
}
_daemon_executable() {
echo "@PREFIX@/sbin/$1"
}
# Checks whether the local machine is part of a cluster
check_config() {
local server_pem=@LOCALSTATEDIR@/lib/ganeti/server.pem
......@@ -147,7 +151,7 @@ start() {
start-stop-daemon --start --quiet --oknodo \
--pidfile $(_daemon_pidfile $name) \
--startas "@PREFIX@/sbin/$name" \
--startas $(_daemon_executable $name) \
-- $args "$@"
}
......
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