mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
logd: Install the admin sockets
Commit id '85d45ff0' added support for the logd admin socket, but forgot to add the socket to the make and spec files for installation purposes. NB: Includes breaking up the long %systemd_ lists across multiple lines for ease of reading Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
d64d5ccb06
commit
bffdd6c303
@ -1520,13 +1520,16 @@ exit 0
|
||||
|
||||
%if %{with_systemd}
|
||||
%if %{with_systemd_macros}
|
||||
%systemd_post virtlockd.socket virtlogd.socket libvirtd.service
|
||||
%systemd_post virtlockd.socket \
|
||||
virtlogd.socket virtlogd-admin.socket \
|
||||
libvirtd.service
|
||||
%else
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl enable \
|
||||
virtlockd.socket \
|
||||
virtlogd.socket \
|
||||
virtlogd-admin.socket \
|
||||
libvirtd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
@ -1553,19 +1556,23 @@ touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
|
||||
%preun daemon
|
||||
%if %{with_systemd}
|
||||
%if %{with_systemd_macros}
|
||||
%systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service
|
||||
%systemd_preun libvirtd.service \
|
||||
virtlogd.socket virtlogd-admin.socket virtlogd.service \
|
||||
virtlockd.socket virtlockd.service
|
||||
%else
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable \
|
||||
libvirtd.service \
|
||||
virtlogd.socket \
|
||||
virtlogd-admin.socket \
|
||||
virtlogd.service \
|
||||
virtlockd.socket \
|
||||
virtlockd.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop \
|
||||
libvirtd.service \
|
||||
virtlogd.socket \
|
||||
virtlogd-admin.socket \
|
||||
virtlogd.service \
|
||||
virtlockd.socket \
|
||||
virtlockd.service > /dev/null 2>&1 || :
|
||||
@ -1613,9 +1620,9 @@ fi
|
||||
if [ $1 -ge 1 ] ; then
|
||||
%if %{with_systemd}
|
||||
/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
|
||||
/bin/systemctl enable virtlogd.socket || :
|
||||
/bin/systemctl enable virtlogd.socket virtlogd-admin.socket || :
|
||||
/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
|
||||
/bin/systemctl start virtlogd.socket || :
|
||||
/bin/systemctl start virtlogd.socket virtlogd-admin.socket || :
|
||||
%else
|
||||
/sbin/chkconfig libvirtd 1>/dev/null 2>&1 &&
|
||||
/sbin/chkconfig virtlogd on || :
|
||||
@ -1820,6 +1827,7 @@ exit 0
|
||||
%{_unitdir}/virt-guest-shutdown.target
|
||||
%{_unitdir}/virtlogd.service
|
||||
%{_unitdir}/virtlogd.socket
|
||||
%{_unitdir}/virtlogd-admin.socket
|
||||
%{_unitdir}/virtlockd.service
|
||||
%{_unitdir}/virtlockd.socket
|
||||
%else
|
||||
|
@ -2806,6 +2806,7 @@ EXTRA_DIST += \
|
||||
locking/test_virtlockd.aug.in \
|
||||
logging/virtlogd.service.in \
|
||||
logging/virtlogd.socket.in \
|
||||
logging/virtlogd-admin.socket.in \
|
||||
logging/virtlogd.aug \
|
||||
logging/virtlogd.conf \
|
||||
logging/test_virtlogd.aug.in \
|
||||
@ -2820,12 +2821,13 @@ if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
||||
|
||||
BUILT_SOURCES += virtlockd.service virtlockd.socket \
|
||||
virtlogd.service virtlogd.socket
|
||||
virtlogd.service virtlogd.socket virtlogd-admin.socket
|
||||
DISTCLEANFILES += virtlockd.service virtlockd.socket \
|
||||
virtlogd.service virtlogd.socket
|
||||
virtlogd.service virtlogd.socket virtlogd-admin.socket
|
||||
|
||||
install-systemd: virtlockd.service virtlockd.socket \
|
||||
virtlogd.service virtlogd.socket install-sysconfig
|
||||
virtlogd.service virtlogd.socket virtlogd-admin.socket \
|
||||
install-sysconfig
|
||||
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
||||
$(INSTALL_DATA) virtlockd.service \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
@ -2835,12 +2837,15 @@ install-systemd: virtlockd.service virtlockd.socket \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
$(INSTALL_DATA) virtlogd.socket \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
$(INSTALL_DATA) virtlogd-admin.socket \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/
|
||||
|
||||
uninstall-systemd: uninstall-sysconfig
|
||||
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket
|
||||
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.service \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd-admin.socket
|
||||
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
||||
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
install-systemd:
|
||||
@ -2875,6 +2880,13 @@ virtlogd.socket: logging/virtlogd.socket.in $(top_builddir)/config.status
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
virtlogd-admin.socket: logging/virtlogd-admin.socket.in \
|
||||
$(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
if WITH_SANLOCK
|
||||
lockdriver_LTLIBRARIES += sanlock.la
|
||||
|
Loading…
Reference in New Issue
Block a user