forked from pool/libvirt
c7b51f773c
- Update to libvirt 1.3.5 - Many incremental improvements and bug fixes, see http://libvirt.org/news.html - Dropped patches: e4d131b8-mv-virDomainDefPostParseInternal.patch, 3e428670-post-parse-implicit-video.patch, 538012c8-default-vram.patch, 96b21fb0-vram-tests.patch, 400e716d-libxl-noprope-emulator.patch, b90c4b5f-tests-use-qemu-xen.patch, fccf2725-libxl-API-4.4.patch, 5325123d-libxl-migv2-save-restore.patch, f9edcfa4-libxl-migv2-migration.patch, a1c9a81a-libxl-rbd-fix.patch, ba566428-libxl-dom-iface-addrs.patch - spec: simplify and cleanup by removing many conditionals that are never toogled. Also drop conditionals for suse_version < 1310 OBS-URL: https://build.opensuse.org/request/show/400351 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=538
141 lines
3.8 KiB
Diff
141 lines
3.8 KiB
Diff
Adjust virtlogd init files to conform to SUSE standards
|
|
|
|
Index: libvirt-1.3.5/src/logging/virtlogd.init.in
|
|
===================================================================
|
|
--- libvirt-1.3.5.orig/src/logging/virtlogd.init.in
|
|
+++ libvirt-1.3.5/src/logging/virtlogd.init.in
|
|
@@ -4,59 +4,56 @@
|
|
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
|
#
|
|
### BEGIN INIT INFO
|
|
-# Provides: virtlogd
|
|
-# 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: virtlogd
|
|
+# 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 log manager
|
|
-# Description: This is a daemon for managing logs
|
|
-# of virtual machine consoles
|
|
+# Description: This is a daemon for managing logs
|
|
+# of virtual machine consoles
|
|
### END INIT INFO
|
|
|
|
# the following is chkconfig init header
|
|
#
|
|
-# virtlogd: virtual machine log manager
|
|
+# virtlogd: virtual machine log manager
|
|
#
|
|
-# chkconfig: 345 96 04
|
|
-# description: This is a daemon for managing logs \
|
|
-# of virtual machine consoles
|
|
+# chkconfig: 345 96 04
|
|
+# description: This is a daemon for managing logs \
|
|
+# of virtual machine consoles
|
|
#
|
|
-# processname: virtlogd
|
|
-# pidfile: @localstatedir@/run/virtlogd.pid
|
|
+# processname: virtlogd
|
|
+# pidfile: @localstatedir@/run/virtlogd.pid
|
|
#
|
|
|
|
-# Source function library.
|
|
-. @sysconfdir@/rc.d/init.d/functions
|
|
+. @sysconfdir@/rc.status
|
|
+rc_reset
|
|
|
|
SERVICE=virtlogd
|
|
-PROCESS=virtlogd
|
|
+PROCESS=@sbindir@/virtlogd
|
|
PIDFILE=@localstatedir@/run/$SERVICE.pid
|
|
|
|
VIRTLOGD_ARGS=
|
|
|
|
test -f @sysconfdir@/sysconfig/virtlogd && . @sysconfdir@/sysconfig/virtlogd
|
|
|
|
-RETVAL=0
|
|
|
|
start() {
|
|
- echo -n $"Starting $SERVICE daemon: "
|
|
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOGD_ARGS
|
|
- RETVAL=$?
|
|
- echo
|
|
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
|
+ echo -n $"Starting $SERVICE "
|
|
+ test -d $PIDDIR || mkdir -p $PIDDIR
|
|
+ startproc -p $PIDFILE $PROCESS --pid-file $PIDFILE --daemon $VIRTLOGD_ARGS
|
|
+ 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 +67,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 +76,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
|
|
Index: libvirt-1.3.5/src/logging/virtlogd.sysconf
|
|
===================================================================
|
|
--- libvirt-1.3.5.orig/src/logging/virtlogd.sysconf
|
|
+++ libvirt-1.3.5/src/logging/virtlogd.sysconf
|
|
@@ -1,3 +1,7 @@
|
|
+## Path: System/Virtualization/virtlogd
|
|
+
|
|
+## Type: string
|
|
+## Default: ""
|
|
#
|
|
# Pass extra arguments to virtlogd
|
|
#VIRTLOGD_ARGS=
|