[PATCH 14/41] remote: don't hardcode /etc in the systemd units

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

 



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/remote/Makefile.inc.am          | 5 +++++
 src/remote/libvirtd-admin.socket.in | 2 +-
 src/remote/libvirtd-ro.socket.in    | 2 +-
 src/remote/libvirtd-tcp.socket.in   | 2 +-
 src/remote/libvirtd-tls.socket.in   | 2 +-
 src/remote/libvirtd.service.in      | 2 +-
 src/remote/libvirtd.socket.in       | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index e45c0a6ce7..7fd50a15df 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -301,30 +301,35 @@ libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status
 libvirtd.socket: remote/libvirtd.socket.in $(top_builddir)/config.status
 	$(AM_V_GEN)sed \
 	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
 	    < $< > $@-t && \
 	    mv $@-t $@
 
 libvirtd-ro.socket: remote/libvirtd-ro.socket.in $(top_builddir)/config.status
 	$(AM_V_GEN)sed \
 	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
 	    < $< > $@-t && \
 	    mv $@-t $@
 
 libvirtd-admin.socket: remote/libvirtd-admin.socket.in $(top_builddir)/config.status
 	$(AM_V_GEN)sed \
 	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
 	    < $< > $@-t && \
 	    mv $@-t $@
 
 libvirtd-tcp.socket: remote/libvirtd-tcp.socket.in $(top_builddir)/config.status
 	$(AM_V_GEN)sed \
 	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
 	    < $< > $@-t && \
 	    mv $@-t $@
 
 libvirtd-tls.socket: remote/libvirtd-tls.socket.in $(top_builddir)/config.status
 	$(AM_V_GEN)sed \
 	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
 	    < $< > $@-t && \
 	    mv $@-t $@
 
diff --git a/src/remote/libvirtd-admin.socket.in b/src/remote/libvirtd-admin.socket.in
index 307c9ba24b..bbab4ea355 100644
--- a/src/remote/libvirtd-admin.socket.in
+++ b/src/remote/libvirtd-admin.socket.in
@@ -5,7 +5,7 @@ BindsTo=libvirtd.socket
 After=libvirtd.socket
 
 [Socket]
-# The directory must match the /etc/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
 # when using systemd version < 227
 ListenStream=@localstatedir@/run/libvirt/libvirt-admin-sock
 Service=libvirtd.service
diff --git a/src/remote/libvirtd-ro.socket.in b/src/remote/libvirtd-ro.socket.in
index 876daf0c9c..5f8b1892d5 100644
--- a/src/remote/libvirtd-ro.socket.in
+++ b/src/remote/libvirtd-ro.socket.in
@@ -5,7 +5,7 @@ BindsTo=libvirtd.socket
 After=libvirtd.socket
 
 [Socket]
-# The directory must match the /etc/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
 # when using systemd version < 227
 ListenStream=@localstatedir@/run/libvirt/libvirt-sock-ro
 Service=libvirtd.service
diff --git a/src/remote/libvirtd-tcp.socket.in b/src/remote/libvirtd-tcp.socket.in
index 16a4764283..1103036c45 100644
--- a/src/remote/libvirtd-tcp.socket.in
+++ b/src/remote/libvirtd-tcp.socket.in
@@ -5,7 +5,7 @@ BindsTo=libvirtd.socket
 After=libvirtd.socket
 
 [Socket]
-# This must match the /etc/libvirt/libvirtd.conf tcp_port setting
+# This must match the @sysconfdir@/libvirt/libvirtd.conf tcp_port setting
 # when using systemd version < 227
 ListenStream=16509
 Service=libvirtd.service
diff --git a/src/remote/libvirtd-tls.socket.in b/src/remote/libvirtd-tls.socket.in
index e904583cf9..e2b1f839de 100644
--- a/src/remote/libvirtd-tls.socket.in
+++ b/src/remote/libvirtd-tls.socket.in
@@ -5,7 +5,7 @@ BindsTo=libvirtd.socket
 After=libvirtd.socket
 
 [Socket]
-# This must match the /etc/libvirt/libvirtd.conf tls_port setting
+# This must match the @sysconfdir@/libvirt/libvirtd.conf tls_port setting
 # when using systemd version < 227
 ListenStream=16514
 Service=libvirtd.service
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 3ddf0e229b..20d6f84d27 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -20,7 +20,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
-EnvironmentFile=-/etc/sysconfig/libvirtd
+EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
 # libvirtd.service is set to run on boot so that autostart of
 # VMs can be performed. We don't want it to stick around if
 # unused though, so we set a timeout. The socket activation
diff --git a/src/remote/libvirtd.socket.in b/src/remote/libvirtd.socket.in
index 2ee4d7d7a2..872f70eb21 100644
--- a/src/remote/libvirtd.socket.in
+++ b/src/remote/libvirtd.socket.in
@@ -3,7 +3,7 @@ Description=Libvirt local socket
 Before=libvirtd.service
 
 [Socket]
-# The directory must match the /etc/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
 # when using systemd version < 227
 ListenStream=@localstatedir@/run/libvirt/libvirt-sock
 Service=libvirtd.service
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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