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

Adapt daemon-util to ENABLE_CONFD



We still allow explicit shutdown of confd, but we prevent manual
or automatic start-up.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent aa224134
#!/bin/bash
#
# Copyright (C) 2009 Google Inc.
# Copyright (C) 2009, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -29,9 +29,12 @@ DAEMONS=(
ganeti-noded
ganeti-masterd
ganeti-rapi
ganeti-confd
)
if [[ "@CUSTOM_ENABLE_CONFD@" == True ]]; then
DAEMONS+=( ganeti-confd )
fi
NODED_ARGS=
MASTERD_ARGS=
CONFD_ARGS=
......@@ -163,6 +166,12 @@ start() {
local name="$1"; shift
if [[ "$name" == ganeti-confd &&
"@CUSTOM_ENABLE_CONFD@" == False ]]; then
echo 'ganeti-confd disabled at build time' >&2
return 1
fi
# Convert daemon name to uppercase after removing "ganeti-" prefix
local plain_name=${name#ganeti-}
local ucname=$(tr a-z A-Z <<<$plain_name)
......
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