mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 15:05:17 +00:00
remote: conditionalize systemd socket unit files
Prepare for reusing libvirtd socket unit files with other daemons by making various parts of their config conditionally defined by the make rules. Reviewed-by: Christophe de Dinechin <dinechin@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
0459223dc7
commit
b2390c3c25
@ -295,6 +295,10 @@ endif WITH_SASL
|
|||||||
|
|
||||||
LIBVIRTD_UNIT_VARS = \
|
LIBVIRTD_UNIT_VARS = \
|
||||||
$(COMMON_UNIT_VARS) \
|
$(COMMON_UNIT_VARS) \
|
||||||
|
-e 's|[@]name[@]|Libvirt|g' \
|
||||||
|
-e 's|[@]service[@]|libvirtd|g' \
|
||||||
|
-e 's|[@]sockprefix[@]|libvirt|g' \
|
||||||
|
-e 's|[@]deps[@]||g' \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status
|
libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Libvirt admin socket
|
Description=@name@ admin socket
|
||||||
Before=libvirtd.service
|
Before=@service@.service
|
||||||
BindsTo=libvirtd.socket
|
BindsTo=@service@.socket
|
||||||
After=libvirtd.socket
|
After=@service@.socket
|
||||||
|
@deps@
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
|
# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
|
||||||
# when using systemd version < 227
|
# when using systemd version < 227
|
||||||
ListenStream=@localstatedir@/run/libvirt/libvirt-admin-sock
|
ListenStream=@localstatedir@/run/libvirt/@sockprefix@-admin-sock
|
||||||
Service=libvirtd.service
|
Service=@service@.service
|
||||||
SocketMode=0600
|
SocketMode=0600
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Libvirt local read-only socket
|
Description=@name@ local read-only socket
|
||||||
Before=libvirtd.service
|
Before=@service@.service
|
||||||
BindsTo=libvirtd.socket
|
BindsTo=@service@.socket
|
||||||
After=libvirtd.socket
|
After=@service@.socket
|
||||||
|
@deps@
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
|
# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
|
||||||
# when using systemd version < 227
|
# when using systemd version < 227
|
||||||
ListenStream=@localstatedir@/run/libvirt/libvirt-sock-ro
|
ListenStream=@localstatedir@/run/libvirt/@sockprefix@-sock-ro
|
||||||
Service=libvirtd.service
|
Service=@service@.service
|
||||||
SocketMode=0666
|
SocketMode=0666
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Libvirt non-TLS IP socket
|
Description=@name@ non-TLS IP socket
|
||||||
Before=libvirtd.service
|
Before=@service@.service
|
||||||
BindsTo=libvirtd.socket
|
BindsTo=@service@.socket
|
||||||
After=libvirtd.socket
|
After=@service@.socket
|
||||||
|
@deps@
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
# This must match the @sysconfdir@/libvirt/libvirtd.conf tcp_port setting
|
# This must match the @sysconfdir@/libvirt/@service@.conf tcp_port setting
|
||||||
# when using systemd version < 227
|
# when using systemd version < 227
|
||||||
ListenStream=16509
|
ListenStream=16509
|
||||||
Service=libvirtd.service
|
Service=@service@.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sockets.target
|
WantedBy=sockets.target
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Libvirt TLS IP socket
|
Description=@name@ TLS IP socket
|
||||||
Before=libvirtd.service
|
Before=@service@.service
|
||||||
BindsTo=libvirtd.socket
|
BindsTo=@service@.socket
|
||||||
After=libvirtd.socket
|
After=@service@.socket
|
||||||
|
@deps@
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
# This must match the @sysconfdir@/libvirt/libvirtd.conf tls_port setting
|
# This must match the @sysconfdir@/libvirt/@service@.conf tls_port setting
|
||||||
# when using systemd version < 227
|
# when using systemd version < 227
|
||||||
ListenStream=16514
|
ListenStream=16514
|
||||||
Service=libvirtd.service
|
Service=@service@.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sockets.target
|
WantedBy=sockets.target
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Libvirt local socket
|
Description=@name@ local socket
|
||||||
Before=libvirtd.service
|
Before=@service@.service
|
||||||
|
@deps@
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
|
# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
|
||||||
# when using systemd version < 227
|
# when using systemd version < 227
|
||||||
ListenStream=@localstatedir@/run/libvirt/libvirt-sock
|
ListenStream=@localstatedir@/run/libvirt/@sockprefix@-sock
|
||||||
Service=libvirtd.service
|
Service=@service@.service
|
||||||
SocketMode=0666
|
SocketMode=0666
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user