From 650cbf7e1391319ef7499508ed49cef74309a31f6f384d5d0d69c9bcd3075a74 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 3 Oct 2013 17:05:53 +0000 Subject: [PATCH] - Fix condrestart|try-restart invocation of virtlockd init script Modifed virtlockd-init-script.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=302 --- libvirt.changes | 6 ++++++ virtlockd-init-script.patch | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index caef74b..29f615d 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 3 11:04:26 MDT 2013 - jfehlig@suse.com + +- Fix condrestart|try-restart invocation of virtlockd init script + Modifed virtlockd-init-script.patch + ------------------------------------------------------------------- Tue Sep 17 16:29:20 MDT 2013 - jfehlig@suse.com diff --git a/virtlockd-init-script.patch b/virtlockd-init-script.patch index c3a9a26..356e3a9 100644 --- a/virtlockd-init-script.patch +++ b/virtlockd-init-script.patch @@ -34,7 +34,7 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in ### END INIT INFO # the following is chkconfig init header -@@ -23,35 +25,31 @@ +@@ -23,35 +25,33 @@ # pidfile: @localstatedir@/run/libvirt/virtlockd.pid # @@ -45,8 +45,10 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in SERVICE=virtlockd -PROCESS=virtlockd +-PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid +PROCESS=@sbindir@/virtlockd - PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid ++PIDDIR=@localstatedir@/run/libvirt/lockd/ ++PIDFILE=$PIDDIR/$SERVICE.pid VIRTLOCKD_ARGS= @@ -58,7 +60,8 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in - echo -n $"Starting $SERVICE daemon: " - daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS + echo -n $"Starting $SERVICE " -+ startproc $PROCESS --daemon $VIRTLOCKD_ARGS ++ test -d $PIDDIR || mkdir -p $PIDDIR ++ startproc -p $PIDFILE $PROCESS --pid-file $PIDFILE --daemon $VIRTLOCKD_ARGS RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE @@ -79,7 +82,7 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in rm -f $PIDFILE fi } -@@ -65,9 +63,7 @@ reload() { +@@ -65,9 +65,7 @@ reload() { echo -n $"Reloading $SERVICE configuration: " killproc -p $PIDFILE $PROCESS -HUP @@ -90,7 +93,7 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in } # See how we were called. -@@ -76,18 +72,20 @@ case "$1" in +@@ -76,18 +74,20 @@ case "$1" in $1 ;; status) @@ -105,7 +108,7 @@ Index: libvirt-1.1.2/src/locking/virtlockd.init.in ;; condrestart|try-restart) - [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || : -+ status >/dev/null && restart || : ++ $0 status >/dev/null && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"