mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-24 09:49:59 +03:00
systemd: Make @service_in@ optional
It is currently considered required, but we're soon going to provide a default that will be suitable for most services. Since all services currently provide a value explicitly, we can implement a default without breaking anything. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@ -194,10 +194,10 @@ guest_unit_files = []
|
|||||||
# virt_daemon_units:
|
# virt_daemon_units:
|
||||||
# generate libvirt daemon systemd unit files
|
# generate libvirt daemon systemd unit files
|
||||||
# * service - name of the service (required)
|
# * service - name of the service (required)
|
||||||
# * service_in - service source file (required)
|
|
||||||
# * name - socket description (required)
|
# * name - socket description (required)
|
||||||
# * sockprefix - socket prefix name (optional, default unit['service'])
|
# * sockprefix - socket prefix name (optional, default unit['service'])
|
||||||
# * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
|
# * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
|
||||||
|
# * service_in - service source file (optional, default remote/libvirtd.service.in)
|
||||||
# * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in )
|
# * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in )
|
||||||
# * deps - socket dependencies (optional, default '')
|
# * deps - socket dependencies (optional, default '')
|
||||||
virt_daemon_units = []
|
virt_daemon_units = []
|
||||||
@ -803,6 +803,8 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
sockmode = '0600'
|
sockmode = '0600'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
service_in_default = 'remote' / 'libvirtd.service.in'
|
||||||
|
|
||||||
foreach unit : virt_daemon_units
|
foreach unit : virt_daemon_units
|
||||||
unit_conf = configuration_data({
|
unit_conf = configuration_data({
|
||||||
'runstatedir': runstatedir,
|
'runstatedir': runstatedir,
|
||||||
@ -816,7 +818,7 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
'sockmode': sockmode,
|
'sockmode': sockmode,
|
||||||
})
|
})
|
||||||
|
|
||||||
service_in = unit['service_in']
|
service_in = unit.get('service_in', service_in_default)
|
||||||
service_out = '@0@.service'.format(unit['service'])
|
service_out = '@0@.service'.format(unit['service'])
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
|
Reference in New Issue
Block a user