diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in index 9a0b5bc2c5b2a2c1e3adca6c38bc905d0e97d78b..dd5eae1041b07820d5ece8a3095f755beadc87af 100644 --- a/daemons/daemon-util.in +++ b/daemons/daemon-util.in @@ -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