This results in all sockets for a service being enabled when a
single one of them is.
The -tcp and -tls sockets are intentionally excluded, because
enabling them should require explicit action on the
administrator's part; moreover, disabling them should not result
in the local sockets being disabled too.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/locking/virtlockd-admin.socket.in | 1 +
src/locking/virtlockd.socket.in | 1 +
src/logging/virtlogd-admin.socket.in | 1 +
src/logging/virtlogd.socket.in | 1 +
src/remote/libvirtd-admin.socket.in | 2 ++
src/remote/libvirtd-ro.socket.in | 2 ++
src/remote/libvirtd.socket.in | 2 ++
src/virtd-admin.socket.in | 2 ++
src/virtd-ro.socket.in | 2 ++
src/virtd.socket.in | 2 ++
10 files changed, 16 insertions(+)
diff --git a/src/locking/virtlockd-admin.socket.in
b/src/locking/virtlockd-admin.socket.in
index d5ebd7f60b..63f78a02da 100644
--- a/src/locking/virtlockd-admin.socket.in
+++ b/src/locking/virtlockd-admin.socket.in
@@ -10,3 +10,4 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=@service@.socket
diff --git a/src/locking/virtlockd.socket.in b/src/locking/virtlockd.socket.in
index d2cc2a06a3..1cd50c70ec 100644
--- a/src/locking/virtlockd.socket.in
+++ b/src/locking/virtlockd.socket.in
@@ -8,3 +8,4 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=@service(a)-admin.socket
diff --git a/src/logging/virtlogd-admin.socket.in b/src/logging/virtlogd-admin.socket.in
index 67259803ca..1d18fe6f56 100644
--- a/src/logging/virtlogd-admin.socket.in
+++ b/src/logging/virtlogd-admin.socket.in
@@ -10,3 +10,4 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=@service@.socket
diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in
index 7b3fc73773..0b85af927b 100644
--- a/src/logging/virtlogd.socket.in
+++ b/src/logging/virtlogd.socket.in
@@ -8,3 +8,4 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=@service(a)-admin.socket
diff --git a/src/remote/libvirtd-admin.socket.in b/src/remote/libvirtd-admin.socket.in
index 098e372971..6df038d95a 100644
--- a/src/remote/libvirtd-admin.socket.in
+++ b/src/remote/libvirtd-admin.socket.in
@@ -10,3 +10,5 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=libvirtd.socket
+Also=libvirtd-ro.socket
diff --git a/src/remote/libvirtd-ro.socket.in b/src/remote/libvirtd-ro.socket.in
index 101555e8a0..6797517c50 100644
--- a/src/remote/libvirtd-ro.socket.in
+++ b/src/remote/libvirtd-ro.socket.in
@@ -10,3 +10,5 @@ SocketMode=0666
[Install]
WantedBy=sockets.target
+Also=libvirtd.socket
+Also=libvirtd-admin.socket
diff --git a/src/remote/libvirtd.socket.in b/src/remote/libvirtd.socket.in
index 3019821df3..f483facdf3 100644
--- a/src/remote/libvirtd.socket.in
+++ b/src/remote/libvirtd.socket.in
@@ -9,3 +9,5 @@ RemoveOnStop=yes
[Install]
WantedBy=sockets.target
+Also=libvirtd-ro.socket
+Also=libvirtd-admin.socket
diff --git a/src/virtd-admin.socket.in b/src/virtd-admin.socket.in
index 8851dde1bc..a4faeb7da8 100644
--- a/src/virtd-admin.socket.in
+++ b/src/virtd-admin.socket.in
@@ -14,4 +14,6 @@ SocketMode=0600
[Install]
WantedBy=sockets.target
+Also=@service@.socket
+Also=@service(a)-ro.socket
@socket_install_extra@
diff --git a/src/virtd-ro.socket.in b/src/virtd-ro.socket.in
index 89b8d80763..829c2e8b1f 100644
--- a/src/virtd-ro.socket.in
+++ b/src/virtd-ro.socket.in
@@ -14,4 +14,6 @@ SocketMode=0666
[Install]
WantedBy=sockets.target
+Also=@service@.socket
+Also=@service(a)-admin.socket
@socket_install_extra@
diff --git a/src/virtd.socket.in b/src/virtd.socket.in
index df4a619dd4..dc25e4d781 100644
--- a/src/virtd.socket.in
+++ b/src/virtd.socket.in
@@ -13,4 +13,6 @@ RemoveOnStop=yes
[Install]
WantedBy=sockets.target
+Also=@service(a)-ro.socket
+Also=@service(a)-admin.socket
@socket_install_extra@
--
2.41.0