mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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 <jfehlig@suse.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bdd8ce02c4
commit
ebf84b2b36
@ -1365,20 +1365,14 @@ then
|
|||||||
# own the sockets again when it comes back up. Thus we must
|
# own the sockets again when it comes back up. Thus we must
|
||||||
# do this particular ordering, so that we get libvirtd
|
# do this particular ordering, so that we get libvirtd
|
||||||
# running with socket activation in use
|
# 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 stop libvirtd.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
/bin/systemctl try-restart \
|
/bin/systemctl try-restart \
|
||||||
libvirtd.socket \
|
libvirtd.socket \
|
||||||
libvirtd-ro.socket \
|
libvirtd-ro.socket \
|
||||||
libvirtd-admin.socket >/dev/null 2>&1 || :
|
libvirtd-admin.socket >/dev/null 2>&1 || :
|
||||||
|
|
||||||
/bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
|
/bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
%libvirt_daemon_finish_restart libvirtd
|
%libvirt_daemon_finish_restart libvirtd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user