libvirt/src/remote/libvirtd-admin.socket.in
Daniel P. Berrangé cc5311e730 systemd: honour $runstatedir in socket unit files
If a systemd socket uses /var/run in its path, systemd prints a warning
at runtime

[   15.139976] systemd[1]: /usr/lib/systemd/system/virtlockd.socket:5:
  ListenStream= references a path below legacy directory /var/run/,
  updating /var/run/libvirt/virtlockd-sock → /run/libvirt/virtlockd-sock;
  please update the unit file accordingly.

This minimal change updates the socket unit files to honour the
$runstatedir path.

There's no functional change by default yet since both expressions
expand to the same value.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-08-27 10:23:05 +01:00

17 lines
389 B
SYSTEMD

[Unit]
Description=@name@ admin socket
Before=@service@.service
BindsTo=@service@.socket
After=@service@.socket
@deps@
[Socket]
# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
# when using systemd version < 227
ListenStream=@runstatedir@/libvirt/@sockprefix@-admin-sock
Service=@service@.service
SocketMode=0600
[Install]
WantedBy=sockets.target