chutzpah    15/05/07 17:40:19

  Added:                ganeti-2.12.3-daemon-util.patch
  Log:
  Version bump.
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
0xE3F69979BB4B8928DA78E3D17CBF44EF)

Revision  Changes    Path
1.1                  app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.12.3-daemon-util.patch?rev=1.1&content-type=text/plain

Index: ganeti-2.12.3-daemon-util.patch
===================================================================
diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
index 6a47253..d7afd84 100644
--- a/daemons/daemon-util.in
+++ b/daemons/daemon-util.in
@@ -31,18 +31,24 @@ set -e
 
 @SHELL_ENV_INIT@
 
-readonly defaults_file="$SYSCONFDIR/default/ganeti"
+readonly defaults_file="$SYSCONFDIR/conf.d/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-wconfd
-  ganeti-rapi
-  ganeti-luxid
-  ganeti-kvmd
-  )
+DAEMONS=( ganeti-noded ) 
+
+_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 )
 
 # This is the list of daemons that are loaded on demand; they should only be
 # stopped, not started.




Reply via email to