[packages/ganeti] - startup script/services cleanup
baggins
baggins at pld-linux.org
Sat Jun 1 19:50:27 CEST 2013
commit 4a9e23c9e944b71ae71ab5ca75027fdf3a164816
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Jun 1 19:48:28 2013 +0200
- startup script/services cleanup
ganeti-confd.init | 1 +
ganeti-masterd.init | 1 +
ganeti-noded.init | 1 +
ganeti-rapi.init | 1 +
ganeti.spec | 4 ++++
systemd.patch | 12 ++++++++----
6 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/ganeti.spec b/ganeti.spec
index 1bc7370..437bc31 100644
--- a/ganeti.spec
+++ b/ganeti.spec
@@ -13,6 +13,7 @@ Source4: ganeti-noded.init
Source5: ganeti-rapi.init
Patch0: fix-no-kvm.patch
Patch1: systemd.patch
+Patch2: daemon-util-use-service.patch
URL: https://code.google.com/p/ganeti/
BuildRequires: autoconf
BuildRequires: automake
@@ -78,6 +79,7 @@ bash-completion for ganeti.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__aclocal} -I autotools
@@ -116,6 +118,8 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-masterd
install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-noded
install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-rapi
+%{__sed} -i -e 's|@LIBDIR@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-*
+
install doc/examples/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/ganeti
install doc/examples/ganeti.cron $RPM_BUILD_ROOT/etc/cron.d/ganeti
install doc/examples/ganeti.default $RPM_BUILD_ROOT/etc/sysconfig/ganeti
diff --git a/ganeti-confd.init b/ganeti-confd.init
index dc0a247..c14d0b8 100644
--- a/ganeti-confd.init
+++ b/ganeti-confd.init
@@ -37,6 +37,7 @@ start() {
fi
msg_starting "Ganeti Cluster config daemon"
+ @LIBDIR@/ganeti/ensure-dirs
daemon --pidfile /var/run/ganeti/ganeti-confd.pid /usr/sbin/ganeti-confd $CONFD_ARGS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-confd
diff --git a/ganeti-masterd.init b/ganeti-masterd.init
index 4511dab..46181ee 100644
--- a/ganeti-masterd.init
+++ b/ganeti-masterd.init
@@ -37,6 +37,7 @@ start() {
fi
msg_starting "Ganeti Cluster master daemon"
+ @LIBDIR@/ganeti/ensure-dirs
daemon --pidfile /var/run/ganeti/ganeti-masterd.pid /usr/sbin/ganeti-masterd $MASTERD_ARGS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-masterd
diff --git a/ganeti-noded.init b/ganeti-noded.init
index 8b4db35..46cef5a 100644
--- a/ganeti-noded.init
+++ b/ganeti-noded.init
@@ -37,6 +37,7 @@ start() {
fi
msg_starting "Ganeti Cluster node daemon"
+ @LIBDIR@/ganeti/ensure-dirs
daemon --pidfile /var/run/ganeti/ganeti-noded.pid /usr/sbin/ganeti-noded $NODED_ARGS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-noded
diff --git a/ganeti-rapi.init b/ganeti-rapi.init
index 1cd1b12..03d567d 100644
--- a/ganeti-rapi.init
+++ b/ganeti-rapi.init
@@ -39,6 +39,7 @@ start() {
fi
msg_starting "Ganeti Cluster remote API daemon"
+ @LIBDIR@/ganeti/ensure-dirs
daemon --pidfile /var/run/ganeti/ganeti-rapi.pid /usr/sbin/ganeti-rapi $_ARGS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-rapi
diff --git a/systemd.patch b/systemd.patch
index 058394e..b415fec 100644
--- a/systemd.patch
+++ b/systemd.patch
@@ -25,7 +25,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
$(BUILT_PYTHON_SOURCES)
--- ganeti-2.6.2/doc/examples.orig/ganeti-confd.service.in 1970-01-01 01:00:00.000000000 +0100
+++ ganeti-2.6.2/doc/examples/ganeti-confd.service.in 2013-06-01 15:55:37.594893846 +0200
-@@ -0,0 +1,17 @@
+@@ -0,0 +1,18 @@
+[Unit]
+Description=Ganeti Confd
+Requires=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
@@ -35,6 +35,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+Type=forking
+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
+EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStartPre=@PKGLIBDIR@/ensure-dirs
+ExecStart=@PREFIX@/sbin/ganeti-confd $CONFD_ARGS
+User=@GNTCONFDUSER@
+Group=@GNTCONFDGROUP@
@@ -45,7 +46,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+WantedBy=ganeti.target
--- ganeti-2.6.2/doc/examples.orig/ganeti-masterd.service.in 1970-01-01 01:00:00.000000000 +0100
+++ ganeti-2.6.2/doc/examples/ganeti-masterd.service.in 2013-06-01 15:55:37.611560663 +0200
-@@ -0,0 +1,18 @@
+@@ -0,0 +1,19 @@
+[Unit]
+Description=Ganeti Masterd
+Requires=ganeti-noded.service
@@ -55,6 +56,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+Type=forking
+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
+EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStartPre=@PKGLIBDIR@/ensure-dirs
+ExecStart=@PREFIX@/sbin/ganeti-masterd $MASTERD_ARGS
+User=@GNTNODEDUSER@
+Group=@GNTDAEMONSGROUP@
@@ -66,7 +68,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+WantedBy=ganeti.target
--- ganeti-2.6.2/doc/examples.orig/ganeti-noded.service.in 1970-01-01 01:00:00.000000000 +0100
+++ ganeti-2.6.2/doc/examples/ganeti-noded.service.in 2013-06-01 15:55:37.631560853 +0200
-@@ -0,0 +1,15 @@
+@@ -0,0 +1,16 @@
+[Unit]
+Description=Ganeti Noded
+
@@ -74,6 +76,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+Type=forking
+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
+EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStartPre=@PKGLIBDIR@/ensure-dirs
+ExecStart=@PREFIX@/sbin/ganeti-noded $NODED_ARGS
+User=@GNTNODEDUSER@
+Group=@GNTDAEMONSGROUP@
@@ -84,7 +87,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+WantedBy=ganeti.target
--- ganeti-2.6.2/doc/examples.orig/ganeti-rapi.service.in 1970-01-01 01:00:00.000000000 +0100
+++ ganeti-2.6.2/doc/examples/ganeti-rapi.service.in 2013-06-01 15:55:37.644894309 +0200
-@@ -0,0 +1,17 @@
+@@ -0,0 +1,18 @@
+[Unit]
+Description=Ganeti RAPI
+Requires=ganeti-noded.service ganeti-masterd.service
@@ -94,6 +97,7 @@ http://code.google.com/p/ganeti/issues/detail?id=444
+Type=forking
+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
+EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStartPre=@PKGLIBDIR@/ensure-dirs
+ExecStart=@PREFIX@/sbin/ganeti-rapi $RAPI_ARGS
+User=@GNTRAPIUSER@
+Group=@GNTRAPIGROUP@
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ganeti.git/commitdiff/4a9e23c9e944b71ae71ab5ca75027fdf3a164816
More information about the pld-cvs-commit
mailing list