forked from pool/libvirt
a870a15461
- Introduce virtlockd daemon - parallels: add disk and network device support - Add virDomainSendProcessSignal API - Introduce virDomainFSTrim() public API - add fuse support for libvirt lxc - Add Gluster protocol as supported network disk backend - various snapshot improvements - Add upstream patches to fix bugs in 1.0.1 66ff2ddc-virtlockd-systemd-file-perms.patch, 462a6962-script-fixes1.patch, cb854b8f-script-fixes2.patch, 5ec4b22b-script-fixes3.patch, a1fd56cb-script-fixes4.patch, 68e7bc45-libxl-link-fix.patch - Rework SUSE patches for the various init scripts Dropped use-init-script-redhat.patch and added libvirtd-init-script.patch, libvirt-guests-init-script.patch, and virtlockd-init-script.patch - Drop upstream patches: 371ddc98-xen-sysctl-9.patch, 416eca18-xenstore-header-fix.patch, f644361b-virCommand-env.patch, 2b32735a-virCommand-env.patch, 9785f2b6-fix-xen-sysctl9.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=238
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.1/src/locking/virtlockd.sysconf
|
|
===================================================================
|
|
--- libvirt-1.0.1.orig/src/locking/virtlockd.sysconf
|
|
+++ libvirt-1.0.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.1/src/locking/virtlockd.init.in
|
|
===================================================================
|
|
--- libvirt-1.0.1.orig/src/locking/virtlockd.init.in
|
|
+++ libvirt-1.0.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
|