Skip to content
Snippets Groups Projects
Commit bb514a22 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

daemon-util: Use function to determine if confd is enabled


… instead of comparing with two different values in two placse.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 370f2768
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,11 @@ DAEMONS=(
ganeti-rapi
)
if [[ "@CUSTOM_ENABLE_CONFD@" == True ]]; then
_confd_enabled() {
[[ "@CUSTOM_ENABLE_CONFD@" == True ]]
}
if _confd_enabled; then
DAEMONS+=( ganeti-confd )
fi
......@@ -211,8 +215,7 @@ start() {
local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name)
if [[ "$name" == ganeti-confd &&
"@CUSTOM_ENABLE_CONFD@" == False ]]; then
if [[ "$name" == ganeti-confd ]] && ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2
return 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment