SHA256
1
0
forked from pool/libvirt

- 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
This commit is contained in:
James Fehlig 2013-10-03 17:05:53 +00:00 committed by Git OBS Bridge
parent c990991474
commit 650cbf7e13
2 changed files with 15 additions and 6 deletions

View File

@ -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

View File

@ -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}"