SHA256
1
0
forked from pool/libvirt
libvirt/suse-libvirt-guests-service.patch
James Fehlig 73e1b007e3 Accepting request 922671 from home:jfehlig:branches:Virtualization
- Update to libvirt 7.8.0
  - jsc#SLE-18260
  - Many incremental improvements and bug fixes, see
    https://libvirt.org/news.html
  - Dropped patches:
    b75a16ae-libxl-improve-die-id.patch,
    65fab900-libxl-fix-driver-reload.patch,
    51eb680b-libxl-dont-autostart-on-reload.patch

- spec: Fix hangs during package update
  bsc#1177902, bsc#1190693
- spec: Don't add --timeout arg to /etc/sysconfig/libvirtd when
  running in traditional mode without socket activation
  bsc#1190695

OBS-URL: https://build.opensuse.org/request/show/922671
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=905
2021-10-01 21:10:15 +00:00

31 lines
1.0 KiB
Diff

Adjust libvirt-guests service to conform to SUSE standards
Index: libvirt-7.8.0/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-7.8.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-7.8.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