SHA256
1
0
forked from pool/libvirt
libvirt/suse-libvirt-guests-service.patch

98 lines
3.4 KiB
Diff
Raw Normal View History

Adjust libvirt-guests service to conform to SUSE standards
Index: libvirt-7.5.0/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-7.5.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-7.5.0/tools/libvirt-guests.sh.in
@@ -20,10 +20,6 @@ sysconfdir="@sysconfdir@"
localstatedir="@localstatedir@"
libvirtd="@sbindir@"/libvirtd
-# Source function library.
-test ! -r "$sysconfdir"/rc.d/init.d/functions ||
- . "$sysconfdir"/rc.d/init.d/functions
-
# Source gettext library.
# Make sure this file is recognized as having translations: _("dummy")
. "@bindir@"/gettext.sh
@@ -43,7 +39,11 @@ test -f "$sysconfdir"/sysconfig/libvirt-
. "$sysconfdir"/sysconfig/libvirt-guests
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
+if [ -d "$localstatedir"/lock/subsys ]; then
+ VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
+else
+ VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
+fi
RETVAL=0
Index: libvirt-7.5.0/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-7.5.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-7.5.0/tools/libvirt-guests.sysconf
@@ -1,9 +1,14 @@
+## Path: System/Virtualization/libvirt-guests
# Customizations for the libvirt-guests.service systemd unit
+## Type: string
+## Default: default
# URIs to check for running guests
# example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
#URIS=default
+## Type: string
+## Default: start
# action taken on host boot
# - start all guests which were running on shutdown are started on boot
# regardless on their autostart settings
@@ -12,10 +17,14 @@
# libvirtd
#ON_BOOT=start
+## Type: integer
+## Default: 0
# Number of seconds to wait between each guest start. Set to 0 to allow
# parallel startup.
#START_DELAY=0
+## Type: string
+## Default: suspend
# action taken on host shutdown
# - suspend all running guests are suspended using virsh managedsave
# - shutdown all running guests are asked to shutdown. Please be careful with
@@ -26,12 +35,16 @@
# value suitable for your guests.
#ON_SHUTDOWN=suspend
+## Type: integer
+## Default: 0
# Number of guests will be shutdown concurrently, taking effect when
# "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one
# after another. Number of guests on shutdown at any time will not exceed number
# set in this variable.
#PARALLEL_SHUTDOWN=0
+## Type: integer
+## Default: 300
# Number of seconds we're willing to wait for a guest to shut down. If parallel
# shutdown is enabled, this timeout applies as a timeout for shutting down all
# guests on a single URI defined in the variable URIS. If this is 0, then there
@@ -39,11 +52,15 @@
# request). The default value is 300 seconds (5 minutes).
#SHUTDOWN_TIMEOUT=300
+## Type: integer
+## Default: 0
# If non-zero, try to bypass the file system cache when saving and
# restoring guests, even though this may give slower operation for
# some file systems.
#BYPASS_CACHE=0
+## Type: integer
+## Default: 0
# If non-zero, try to sync guest time on domain resume. Be aware, that
# this requires guest agent with support for time synchronization
# running in the guest. By default, this functionality is turned off.