- startup script/services cleanup
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 1 Jun 2013 17:48:28 +0000 (19:48 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 1 Jun 2013 17:48:28 +0000 (19:48 +0200)
ganeti-confd.init
ganeti-masterd.init
ganeti-noded.init
ganeti-rapi.init
ganeti.spec
systemd.patch

index dc0a247f5ff34bfbbba9a22f08aaec50f52a0a10..c14d0b8a96893df70a36531e041e3da8d5333c07 100644 (file)
@@ -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
index 4511dab71c7424fc2f34cde0f4d10d268507935c..46181ee889cf0bcfa3a4b45becea1badd36e28de 100644 (file)
@@ -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
index 8b4db351882bd490daf872c099d40be1992bd648..46cef5ac1c0cb25881f484091ccc3c618a50d6b3 100644 (file)
@@ -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
index 1cd1b12ccd2053aae2d5441a15ecdc094dae965e..03d567d2c7d75f1be07ac1d03efcf062696f9566 100644 (file)
@@ -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
index 1bc73701bf59b5250a0fa43e8f8f7238f45b80cf..437bc31e9a2d96eead806583b8dbf00f9fd42aeb 100644 (file)
@@ -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
index 058394e6b76b59fea2350dba1f4fb9170c581055..b415fece7dad363c3f90825560d99cc6cfe3bfde 100644 (file)
@@ -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@
This page took 0.234463 seconds and 4 git commands to generate.