diff options
Diffstat (limited to 'app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch')
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch b/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch new file mode 100644 index 000000000000..c668a2131178 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch @@ -0,0 +1,38 @@ +From 041efca59326baf7c2ec08dd505e06ae86dd6954 Mon Sep 17 00:00:00 2001 +From: Lance Albertson <lance@osuosl.org> +Date: Wed, 25 Jul 2012 16:21:21 -0700 +Subject: [PATCH] Check if process is already running and skip if so + +Gentoo uses a modified version of start-stop-daemon which returns an error if it +sees another process running with the same name. This happens during cluster +initialization since ganeti-noded gets fired off first. +--- + daemons/daemon-util.in | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in +index 00fe1b6..8e4ce97 100644 +--- a/daemons/daemon-util.in ++++ b/daemons/daemon-util.in +@@ -172,11 +172,13 @@ start() { + + @PKGLIBDIR@/ensure-dirs + +- start-stop-daemon --start --quiet \ +- --pidfile $(_daemon_pidfile $name) \ +- --exec $(_daemon_executable $name) \ +- --user $(_daemon_usergroup $plain_name) \ +- -- $args "$@" ++ if ! ret=$(/usr/bin/pgrep $name) ; then ++ start-stop-daemon --start --quiet \ ++ --pidfile $(_daemon_pidfile $name) \ ++ --exec $(_daemon_executable $name) \ ++ --user $(_daemon_usergroup $plain_name) \ ++ -- $args "$@" ++ fi + } + + # Stops a daemon +-- +1.7.9.5 + |