[libvirt PATCH 10/42] systemd: Make @sockprefix@ optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For most services, the socket paths can be derived trivially from
the name of the daemon: for virtqemud, for example, they will be

  /run/libvirt/virtqemud-sock
  /run/libvirt/virtqemud-sock-ro
  /run/libvirt/virtqemud-admin-sock

libvirtd and virtproxyd are the exceptions, since their socket
paths will be

  /run/libvirt/libvirt-sock
  /run/libvirt/libvirt-sock-ro
  /run/libvirt/libvirt-admin-sock

So we still need to be able to provide a custom @sockprefix@ in
those cases, but in the most common scenario we can do away with
the requirement by introducing a sensible default.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/meson.build b/src/meson.build
index 9d5085a8aa..6c85cc9b9b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -196,7 +196,7 @@ guest_unit_files = []
 #   * service - name of the service (required)
 #   * service_in - service source file (required)
 #   * name - socket description (required)
-#   * sockprefix - socket prefix name (required)
+#   * sockprefix - socket prefix name (optional, default unit['service'])
 #   * sockets - array of additional sockets (optional, default [ 'main', 'ro', 'admin' ])
 #   * socket_$name_in - additional socket source files (optional, default remote/libvirtd.socket.in )
 #   * deps - socket dependencies (optional, default '')
@@ -811,7 +811,7 @@ if conf.has('WITH_LIBVIRTD')
         'initconfdir': initconfdir,
         'name': unit['name'],
         'service': unit['service'],
-        'sockprefix': unit['sockprefix'],
+        'sockprefix': unit.get('sockprefix', unit['service']),
         'deps': unit.get('deps', ''),
         'sockmode': sockmode,
       })
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux