summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/ganeti/files/ganeti-2.15-daemon-util.patch')
-rw-r--r--app-emulation/ganeti/files/ganeti-2.15-daemon-util.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/app-emulation/ganeti/files/ganeti-2.15-daemon-util.patch b/app-emulation/ganeti/files/ganeti-2.15-daemon-util.patch
new file mode 100644
index 000000000000..25233c37a455
--- /dev/null
+++ b/app-emulation/ganeti/files/ganeti-2.15-daemon-util.patch
@@ -0,0 +1,53 @@
+diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
+index 7636fc9..9c681ab 100644
+--- a/daemons/daemon-util.in
++++ b/daemons/daemon-util.in
+@@ -31,25 +31,26 @@ set -e
+
+ @SHELL_ENV_INIT@
+
+-readonly defaults_file="$SYSCONFDIR/default/ganeti"
+-
+-# This is a list of all daemons and the order in which they're started. The
+-# order is important as there are dependencies between them. On shutdown,
+-# they're stopped in reverse order.
+-DAEMONS=(
+- ganeti-noded
+- ganeti-confd
+- ganeti-wconfd
+- ganeti-rapi
+- ganeti-luxid
+- ganeti-kvmd
+- )
++readonly defaults_file="$SYSCONFDIR/conf.d/ganeti"
+
+ # This is the list of daemons that are loaded on demand; they should only be
+ # stopped, not started.
+ ON_DEMAND_DAEMONS=(
+ ganeti-metad
+ )
++DAEMONS=( ganeti-noded ganeti-confd )
++
++_is_master() {
++ [ -z "${GANETI_MASTER}" ] && GANETI_MASTER="$(gnt-cluster getmaster)"
++ [ -z "${LOCAL_HOSTNAME}" ] && LOCAL_HOSTNAME="$(hostname -f)"
++ [ "${GANETI_MASTER}" = "${LOCAL_HOSTNAME}" ]
++}
++
++if _is_master; then
++ DAEMONS+=( ganeti-wconfd ganeti-rapi ganeti-luxid )
++fi
++
++DAEMONS+=( ganeti-kvmd )
+
+ _mond_enabled() {
+ [[ "@CUSTOM_ENABLE_MOND@" == True ]]
+@@ -246,7 +247,7 @@ check() {
+ return 1
+ fi
+ elif type -p start-stop-daemon >/dev/null; then
+- start-stop-daemon --stop --signal 0 --quiet \
++ start-stop-daemon --signal 0 --quiet \
+ --pidfile $pidfile
+ else
+ _ignore_error status \