Substitute in the @sysconfigdir@ value instead of /etc.
Reviewed-by: Christophe de Dinechin <dinechin@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
$(AM_V_GEN)sed \
-e 's|[@]sbindir[@]|$(sbindir)|g' \
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
< $< > $@-t && \
mv $@-t $@
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-/etc/sysconfig/virtlockd
+EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the locks is a really bad thing that will
virtlogd.service: logging/virtlogd.service.in $(top_builddir)/config.status
$(AM_V_GEN)sed \
-e 's|[@]sbindir[@]|$(sbindir)|g' \
+ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
< $< > $@-t && \
mv $@-t $@
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-/etc/sysconfig/virtlogd
+EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the logs is a really bad thing that will
$(AM_V_GEN)$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/d' \
-e '/[@]END[@]/d' \
+ -e 's|[@]sysconfdir[@]|@sysconfdir@|' \
-e 's|[@]DAEMON_NAME[@]|libvirtd|' \
$< > $@
$(AM_V_GEN)$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/d' \
-e '/[@]END[@]/d' \
+ -e 's|[@]sysconfdir[@]|@sysconfdir@|' \
-e 's|[@]DAEMON_NAME[@]|libvirtd|' \
-e 's|[@]DAEMON_NAME_UC[@]|Libvirtd|' \
$< > $@
$(SED) \
-e '/[@]CUT_ENABLE_IP[@]/d' \
-e '/[@]END[@]/d' \
+ -e 's|[@]sysconfdir[@]|@sysconfdir@|' \
-e 's|[@]DAEMON_NAME[@]|libvirtd|' \
-e 's|[@]DAEMON_NAME_UC[@]|Libvirtd|' \
> $@ || rm -f $@
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 $@
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
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
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
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
-(* /etc/libvirt/@DAEMON_NAME@.conf *)
+(* @sysconfdir@/libvirt/@DAEMON_NAME@.conf *)
module @DAEMON_NAME_UC@ =
autoload xfm
let lns = ( record | comment | empty ) *
- let filter = incl "/etc/libvirt/@DAEMON_NAME@.conf"
+ let filter = incl "@sysconfdir@/libvirt/@DAEMON_NAME@.conf"
. Util.stdexcl
let xfm = transform lns filter
# the network providing auth (eg, TLS/x509 certificates)
#
# - sasl: use SASL infrastructure. The actual auth scheme is then
-# controlled from /etc/sasl2/libvirt.conf. For the TCP
+# controlled from @sysconfdir@/sasl2/libvirt.conf. For the TCP
# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
# For non-TCP or TLS sockets, any scheme is allowed.
#
# If you don't enable SASL, then all TCP traffic is cleartext.
# Don't do this outside of a dev/test scenario. For real world
# use, always enable SASL and use the GSSAPI or DIGEST-MD5
-# mechanism in /etc/sasl2/libvirt.conf
+# mechanism in @sysconfdir@/sasl2/libvirt.conf
#auth_tcp = "sasl"
# Change the authentication scheme for TLS sockets.
# Use of TLS requires that x509 certificates be issued. The default locations
# for the certificate files is as follows:
#
-# /etc/pki/CA/cacert.pem - The CA master certificate
-# /etc/pki/libvirt/servercert.pem - The server certificate signed with
-# the cacert.pem
-# /etc/pki/libvirt/private/serverkey.pem - The server private key
+# @sysconfdir@/pki/CA/cacert.pem - The CA master certificate
+# @sysconfdir@/pki/libvirt/servercert.pem - The server certificate signed by cacert.pem
+# @sysconfdir@/pki/libvirt/private/serverkey.pem - The server private key
#
# It is possible to override the default locations by altering the 'key_file',
# 'cert_file', and 'ca_file' values and uncommenting them below.
# Override the default server key file path
#
-#key_file = "/etc/pki/libvirt/private/serverkey.pem"
+#key_file = "@sysconfdir@/pki/libvirt/private/serverkey.pem"
# Override the default server certificate file path
#
-#cert_file = "/etc/pki/libvirt/servercert.pem"
+#cert_file = "@sysconfdir@/pki/libvirt/servercert.pem"
# Override the default CA certificate path
#
-#ca_file = "/etc/pki/CA/cacert.pem"
+#ca_file = "@sysconfdir@/pki/CA/cacert.pem"
# Specify a certificate revocation list.
#
# Defaults to not using a CRL, uncomment to enable it
-#crl_file = "/etc/pki/CA/crl.pem"
+#crl_file = "@sysconfdir@/pki/CA/crl.pem"
[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
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
{ "1" = "polkit" }
}
@CUT_ENABLE_IP@
- { "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
- { "cert_file" = "/etc/pki/libvirt/servercert.pem" }
- { "ca_file" = "/etc/pki/CA/cacert.pem" }
- { "crl_file" = "/etc/pki/CA/crl.pem" }
+ { "key_file" = "@sysconfdir@/pki/libvirt/private/serverkey.pem" }
+ { "cert_file" = "@sysconfdir@/pki/libvirt/servercert.pem" }
+ { "ca_file" = "@sysconfdir@/pki/CA/cacert.pem" }
+ { "crl_file" = "@sysconfdir@/pki/CA/crl.pem" }
{ "tls_no_sanity_certificate" = "1" }
{ "tls_no_verify_certificate" = "1" }
{ "tls_allowed_dn_list"
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-/etc/sysconfig/libvirt-guests
+EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
# Hack just call traditional service until we factor
# out the code
ExecStart=@libexecdir@/libvirt-guests.sh start