Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 561044 | Differences between
and this patch

Collapse All | Expand All

(-)ganeti.old (-13 lines)
Lines 11-22 Link Here
11
11
12
DAEMON_UTIL="/usr/lib/ganeti/daemon-util"
12
DAEMON_UTIL="/usr/lib/ganeti/daemon-util"
13
13
14
is_master() {
15
	[ -z "${ganeti_master}" ] && ganeti_master="$(gnt-cluster getmaster)"
16
	[ -z "${local_hostname}" ] && local_hostname="$(hostname -f)"
17
	[ "${ganeti_master}" = "${local_hostname}" ]
18
}
19
20
start() {
14
start() {
21
	if ! [ -e ${DAEMON_UTIL} ]; then
15
	if ! [ -e ${DAEMON_UTIL} ]; then
22
		eerror "Could not find daemon utility at ${DAEMON_UTIL}"
16
		eerror "Could not find daemon utility at ${DAEMON_UTIL}"
Lines 31-40 Link Here
31
	for daemon in $(${DAEMON_UTIL} list-start-daemons); do
25
	for daemon in $(${DAEMON_UTIL} list-start-daemons); do
32
		optsvar="${daemon//-/_}"
26
		optsvar="${daemon//-/_}"
33
27
34
		case "${daemon#ganeti-}" in
35
			masterd|rapi|luxid) is_master || continue;;
36
		esac
37
38
		eval daemon_opts=\"\$\{${optsvar^^*}_OPTS\}\"
28
		eval daemon_opts=\"\$\{${optsvar^^*}_OPTS\}\"
39
29
40
		ebegin "Starting ${daemon}"
30
		ebegin "Starting ${daemon}"
Lines 73-81 Link Here
73
	local daemon
63
	local daemon
74
64
75
	for daemon in $(${DAEMON_UTIL} list-stop-daemons) ; do \
65
	for daemon in $(${DAEMON_UTIL} list-stop-daemons) ; do \
76
		case "${daemon#ganeti-}" in
77
			masterd|rapi|luxid) is_master || continue;;
78
		esac
79
		${DAEMON_UTIL} stop ${daemon} ${GANETI_OPTS}
66
		${DAEMON_UTIL} stop ${daemon} ${GANETI_OPTS}
80
	done
67
	done
81
}
68
}

Return to bug 561044