libvirt/virtlockd-init-script.patch
James Fehlig 14c21278a9 Accepting request 476767 from home:jfehlig:branches:Virtualization
- Update to libvirt 3.1.0
  - Modularize storage driver by splitting it into backend-specific
    subpackages
  - CVE-2017-2635, bsc#1027075
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Dropped patches:
    b018ada3-shunloadtest-build-fix.patch,
    f86a7a83-libxl-dom0-balloon-fix.patch,
    6e4759d0-libxl-timer-fix.patch,
    87df87e0-libxl-timer-tsc-emulate.patch,
    b4386fda-xenconfig-timer-fix.patch,
    d3970925-timer-tests.patch,
    321a28c6-libxl-default-disk-format.patch,
    bd116810-libxl-fix-disk-detach.patch,
    ff225538-libxl-autoballoon-setting.patch,
    c89a6e78-libxl-physinfo-cleanup.patch,
    d2b77608-libxl-maxmem-fix.patch,
    79692c38-libxl-dom0-maxmem.patch,
    4ab0c959-libxl-mem-leak.patch,
    2dc1cf19-libxl-double-free.patch,
    apparmor-errormsg-fix.patch,
    apparmor-alt-seclabel.patch,
    qemu-disable-namespaces.patch

OBS-URL: https://build.opensuse.org/request/show/476767
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=588
2017-03-03 15:02:55 +00:00

143 lines
4.0 KiB
Diff

Adjust virtlockd init files to conform to SUSE standards
Index: libvirt-3.1.0/src/locking/virtlockd.sysconf
===================================================================
--- libvirt-3.1.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-3.1.0/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd
+
+## Type: string
+## Default: ""
#
# Pass extra arguments to virtlockd
#VIRTLOCKD_ARGS=
Index: libvirt-3.1.0/src/locking/virtlockd.init.in
===================================================================
--- libvirt-3.1.0.orig/src/locking/virtlockd.init.in
+++ libvirt-3.1.0/src/locking/virtlockd.init.in
@@ -4,59 +4,57 @@
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
#
### BEGIN INIT INFO
-# Provides: virtlockd
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 2 6
-# Required-Start:
-# Required-Stop:
-# Should-Start: $network $remote_fs
-# Should-Stop: $network $remote_fs
+# Provides: virtlockd
+# Required-Start: $network $remote_fs
+# Required-Stop: $network $remote_fs
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 4 6
+# Should-Start:
+# Should-Stop:
# 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
#
-# virtlockd: virtual machine lock manager
+# virtlockd: virtual machine lock manager
#
-# chkconfig: 345 96 04
-# description: This is a daemon for managing locks \
-# on virtual machine disk images
+# chkconfig: 345 96 04
+# description: This is a daemon for managing locks \
+# on virtual machine disk images
#
-# processname: virtlockd
-# pidfile: @localstatedir@/run/virtlockd.pid
+# processname: virtlockd
+# pidfile: @localstatedir@/run/virtlockd.pid
#
-# Source function library.
-. @sysconfdir@/rc.d/init.d/functions
+. @sysconfdir@/rc.status
+rc_reset
SERVICE=virtlockd
-PROCESS=virtlockd
-PIDFILE=@localstatedir@/run/$SERVICE.pid
+PROCESS=@sbindir@/virtlockd
+PIDDIR=@localstatedir@/run/libvirt/lockd/
+PIDFILE=$PIDDIR/$SERVICE.pid
VIRTLOCKD_ARGS=
test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
-RETVAL=0
-
start() {
- echo -n $"Starting $SERVICE daemon: "
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
+ echo -n $"Starting $SERVICE "
+ 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
+ rc_status -v
}
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 $PIDFILE
fi
}
@@ -70,9 +68,7 @@ reload() {
echo -n $"Reloading $SERVICE configuration: "
killproc -p $PIDFILE $PROCESS -USR1
- RETVAL=$?
- echo
- return $RETVAL
+ rc_status
}
# See how we were called.
@@ -81,18 +77,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 || :
+ $0 status >/dev/null && 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