From: Jim Fehlig Date: Tue, 19 Jul 2022 23:10:01 +0000 (-0600) Subject: spec: Remove duplicate check of libvirtd status X-Git-Tag: v8.7.0-rc1~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf84b2b36573ee9bc50c37464f18590ecada0eb;p=thirdparty%2Flibvirt.git spec: Remove duplicate check of libvirtd status The %posttrans scriptlet checks if libvirtd is active within a condition that is only executed if libvirtd is active. Remove the duplicate check. Signed-off-by: Jim Fehlig Reviewed-by: Michal Privoznik --- diff --git a/libvirt.spec.in b/libvirt.spec.in index 9d788b790f..a238edf2aa 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1365,18 +1365,12 @@ then # own the sockets again when it comes back up. Thus we must # do this particular ordering, so that we get libvirtd # running with socket activation in use - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 - if test $? = 0 - then - /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : - - /bin/systemctl try-restart \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket >/dev/null 2>&1 || : - - /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : - fi + /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : + /bin/systemctl try-restart \ + libvirtd.socket \ + libvirtd-ro.socket \ + libvirtd-admin.socket >/dev/null 2>&1 || : + /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : fi fi