forked from pool/libvirt
9decd8f3cc
- qemu: Fix cgroup handling when setting VCPU BW - daemon: fix leak after listing all volumes - Fix iohelper usage with streams opened for read - util: fix virFileOpenAs return value and resulting error logs - iscsi: don't leak portal string when starting a pool - don't mention disk controllers in generic controller errors - conf: don't crash on a tpm device with no backends - qemu: allocate network connections sooner during domain startup - Make detect_scsi_host_caps a function on all architectures - Fix release of resources with lockd plugin - Fix potential use of undefined variable in remote dispatch code - Fix F_DUPFD_CLOEXEC operation args - qemu: fix stupid typos in VFIO cgroup setup/teardown - network: fix network driver startup for qemu:///session - Remove patches that are included in the 1.0.5.1 release 0471637d-cgroups-vcpu-bw.patch, a2214c52-iohelper.patch, ca697e90-CVE-2013-1962.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=266
126 lines
3.5 KiB
Diff
126 lines
3.5 KiB
Diff
Adjust virtlockd init files to conform to SUSE standards
|
|
|
|
Index: libvirt-1.0.5.1/src/locking/virtlockd.sysconf
|
|
===================================================================
|
|
--- libvirt-1.0.5.1.orig/src/locking/virtlockd.sysconf
|
|
+++ libvirt-1.0.5.1/src/locking/virtlockd.sysconf
|
|
@@ -1,3 +1,7 @@
|
|
+## Path: System/Virtualization/virtlockd
|
|
+
|
|
+## Type: string
|
|
+## Default: ""
|
|
#
|
|
# Pass extra arguments to virtlockd
|
|
#VIRTLOCKD_ARGS=
|
|
Index: libvirt-1.0.5.1/src/locking/virtlockd.init.in
|
|
===================================================================
|
|
--- libvirt-1.0.5.1.orig/src/locking/virtlockd.init.in
|
|
+++ libvirt-1.0.5.1/src/locking/virtlockd.init.in
|
|
@@ -4,11 +4,13 @@
|
|
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
|
|
#
|
|
### BEGIN INIT INFO
|
|
-# Provides: virtlockd
|
|
-# Default-Start: 3 4 5
|
|
+# Provides: virtlockd
|
|
+# Required-Start: $network $remote_fs
|
|
+# Default-Start: 3 4 5
|
|
+# Required-Stop: $network $remote_fs
|
|
# Short-Description: virtual machine lock manager
|
|
-# Description: This is a daemon for managing locks
|
|
-# on virtual machine disk images
|
|
+# Description: This is a daemon for managing locks
|
|
+# on virtual machine disk images
|
|
### END INIT INFO
|
|
|
|
# the following is chkconfig init header
|
|
@@ -23,35 +25,39 @@
|
|
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
|
#
|
|
|
|
-# Source function library.
|
|
-. @sysconfdir@/rc.d/init.d/functions
|
|
+. @sysconfdir@/rc.status
|
|
+rc_reset
|
|
|
|
SERVICE=virtlockd
|
|
-PROCESS=virtlockd
|
|
+PROCESS=@sbindir@/virtlockd
|
|
PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid
|
|
|
|
VIRTLOCKD_ARGS=
|
|
|
|
test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
|
|
|
|
-RETVAL=0
|
|
+if [ -d @localstatedir@/lock/subsys ]; then
|
|
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/subsys/$SERVICE
|
|
+else
|
|
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/$SERVICE
|
|
+fi
|
|
|
|
start() {
|
|
- echo -n $"Starting $SERVICE daemon: "
|
|
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
|
|
+ echo -n $"Starting $SERVICE "
|
|
+ startproc $PROCESS --daemon $VIRTLOCKD_ARGS
|
|
RETVAL=$?
|
|
- echo
|
|
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
|
+ rc_status -v
|
|
+ [ $RETVAL -eq 0 ] && touch $VAR_SUBSYS_VIRTLOCKD
|
|
}
|
|
|
|
stop() {
|
|
- echo -n $"Stopping $SERVICE daemon: "
|
|
+ echo -n $"Stopping $SERVICE "
|
|
|
|
- killproc -p $PIDFILE $PROCESS
|
|
+ killproc -p $PIDFILE $PROCESS > /dev/null 2>&1
|
|
RETVAL=$?
|
|
- echo
|
|
+ rc_status -v
|
|
if [ $RETVAL -eq 0 ]; then
|
|
- rm -f @localstatedir@/lock/subsys/$SERVICE
|
|
+ rm -f $VAR_SUBSYS_VIRTLOCKD
|
|
rm -f $PIDFILE
|
|
fi
|
|
}
|
|
@@ -65,9 +71,7 @@ reload() {
|
|
echo -n $"Reloading $SERVICE configuration: "
|
|
|
|
killproc -p $PIDFILE $PROCESS -HUP
|
|
- RETVAL=$?
|
|
- echo
|
|
- return $RETVAL
|
|
+ rc_status
|
|
}
|
|
|
|
# See how we were called.
|
|
@@ -76,18 +80,20 @@ case "$1" in
|
|
$1
|
|
;;
|
|
status)
|
|
- status -p $PIDFILE $PROCESS
|
|
- RETVAL=$?
|
|
+ echo -n "Checking status of $SERVICE "
|
|
+ checkproc $PROCESS
|
|
+ rc_status -v
|
|
;;
|
|
force-reload)
|
|
reload
|
|
;;
|
|
condrestart|try-restart)
|
|
- [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
|
+ [ -f $VAR_SUBSYS_VIRTLOCKD ] && restart || :
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
|
- exit 2
|
|
+ rc_failed 2
|
|
+ rc_exit
|
|
;;
|
|
esac
|
|
-exit $RETVAL
|
|
+rc_exit
|