meson: Use initconfdir

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Andrea Bolognani 2023-04-29 18:23:12 +02:00
parent 9850b37e39
commit 32f772e986
23 changed files with 31 additions and 26 deletions

View File

@ -42,7 +42,7 @@ FILES
``libvirt-guests`` defines several variables to control service behavior. ``libvirt-guests`` defines several variables to control service behavior.
The default value of these variables can be overridden in: The default value of these variables can be overridden in:
* ``@SYSCONFDIR@/sysconfig/libvirt-guests`` * ``@INITCONFDIR@/libvirt-guests``
The following variables are supported: The following variables are supported:

View File

@ -88,6 +88,7 @@ endforeach
docs_man_conf = configuration_data({ docs_man_conf = configuration_data({
'SYSCONFDIR': sysconfdir, 'SYSCONFDIR': sysconfdir,
'RUNSTATEDIR': runstatedir, 'RUNSTATEDIR': runstatedir,
'INITCONFDIR': initconfdir,
'VERSION': meson.project_version(), 'VERSION': meson.project_version(),
}) })

View File

@ -18,7 +18,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTCHD_ARGS="--timeout 120" Environment=VIRTCHD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtchd EnvironmentFile=-@initconfdir@/virtchd
ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process

View File

@ -14,7 +14,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTINTERFACED_ARGS="--timeout 120" Environment=VIRTINTERFACED_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced EnvironmentFile=-@initconfdir@/virtinterfaced
ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -19,7 +19,7 @@ ConditionPathExists=/proc/xen/capabilities
[Service] [Service]
Type=notify Type=notify
Environment=VIRTXEND_ARGS="--timeout 120" Environment=VIRTXEND_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtxend EnvironmentFile=-@initconfdir@/virtxend
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -8,7 +8,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Environment=VIRTLOCKD_ARGS= Environment=VIRTLOCKD_ARGS=
EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd EnvironmentFile=-@initconfdir@/virtlockd
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID ExecReload=/bin/kill -USR1 $MAINPID
# Losing the locks is a really bad thing that will # Losing the locks is a really bad thing that will

View File

@ -7,7 +7,7 @@ Documentation=man:virtlogd(8)
Documentation=https://libvirt.org Documentation=https://libvirt.org
[Service] [Service]
EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd EnvironmentFile=-@initconfdir@/virtlogd
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID ExecReload=/bin/kill -USR1 $MAINPID
# Losing the logs is a really bad thing that will # Losing the logs is a really bad thing that will

View File

@ -18,7 +18,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTLXCD_ARGS="--timeout 120" Environment=VIRTLXCD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd EnvironmentFile=-@initconfdir@/virtlxcd
ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process

View File

@ -808,6 +808,7 @@ if conf.has('WITH_LIBVIRTD')
'runstatedir': runstatedir, 'runstatedir': runstatedir,
'sbindir': sbindir, 'sbindir': sbindir,
'sysconfdir': sysconfdir, 'sysconfdir': sysconfdir,
'initconfdir': initconfdir,
'name': unit['name'], 'name': unit['name'],
'service': unit['service'], 'service': unit['service'],
'sockprefix': unit['sockprefix'], 'sockprefix': unit['sockprefix'],

View File

@ -17,7 +17,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTNETWORKD_ARGS="--timeout 120" Environment=VIRTNETWORKD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd EnvironmentFile=-@initconfdir@/virtnetworkd
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -14,7 +14,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTNODEDEVD_ARGS="--timeout 120" Environment=VIRTNODEDEVD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd EnvironmentFile=-@initconfdir@/virtnodedevd
ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -14,7 +14,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTNWFILTERD_ARGS="--timeout 120" Environment=VIRTNWFILTERD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd EnvironmentFile=-@initconfdir@/virtnwfilterd
ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -20,7 +20,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTQEMUD_ARGS="--timeout 120" Environment=VIRTQEMUD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud EnvironmentFile=-@initconfdir@/virtqemud
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process

View File

@ -28,7 +28,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=LIBVIRTD_ARGS="--timeout 120" Environment=LIBVIRTD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd EnvironmentFile=-@initconfdir@/libvirtd
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=process KillMode=process

View File

@ -14,7 +14,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTPROXYD_ARGS="--timeout 120" Environment=VIRTPROXYD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd EnvironmentFile=-@initconfdir@/virtproxyd
ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -14,7 +14,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTSECRETD_ARGS="--timeout 120" Environment=VIRTSECRETD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd EnvironmentFile=-@initconfdir@/virtsecretd
ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -16,7 +16,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTSTORAGED_ARGS="--timeout 120" Environment=VIRTSTORAGED_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged EnvironmentFile=-@initconfdir@/virtstoraged
ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -15,7 +15,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTVBOXD_ARGS="--timeout 120" Environment=VIRTVBOXD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd EnvironmentFile=-@initconfdir@/virtvboxd
ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -15,7 +15,7 @@ Documentation=https://libvirt.org
[Service] [Service]
Type=notify Type=notify
Environment=VIRTVZD_ARGS="--timeout 120" Environment=VIRTVZD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd EnvironmentFile=-@initconfdir@/virtvzd
ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure

View File

@ -14,7 +14,7 @@ Documentation=man:libvirt-guests(8)
Documentation=https://libvirt.org Documentation=https://libvirt.org
[Service] [Service]
EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests EnvironmentFile=-@initconfdir@/libvirt-guests
# Hack just call traditional service until we factor # Hack just call traditional service until we factor
# out the code # out the code
ExecStart=@libexecdir@/libvirt-guests.sh start ExecStart=@libexecdir@/libvirt-guests.sh start

View File

@ -18,6 +18,7 @@
sysconfdir="@sysconfdir@" sysconfdir="@sysconfdir@"
localstatedir="@localstatedir@" localstatedir="@localstatedir@"
initconfdir="@initconfdir@"
libvirtd="@sbindir@"/libvirtd libvirtd="@sbindir@"/libvirtd
# Source function library. # Source function library.
@ -39,8 +40,8 @@ START_DELAY=0
BYPASS_CACHE=0 BYPASS_CACHE=0
SYNC_TIME=0 SYNC_TIME=0
test -f "$sysconfdir"/sysconfig/libvirt-guests && test -f "$initconfdir"/libvirt-guests &&
. "$sysconfdir"/sysconfig/libvirt-guests . "$initconfdir"/libvirt-guests
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests

View File

@ -241,6 +241,7 @@ tools_conf = configuration_data({
'sbindir': sbindir, 'sbindir': sbindir,
'schemadir': pkgdatadir / 'schemas', 'schemadir': pkgdatadir / 'schemas',
'sysconfdir': sysconfdir, 'sysconfdir': sysconfdir,
'initconfdir': initconfdir,
}) })
configure_file( configure_file(

View File

@ -73,6 +73,7 @@ echo Found "$CERTOOL"
# #
SYSCONFDIR="@sysconfdir@" SYSCONFDIR="@sysconfdir@"
PKI="$SYSCONFDIR/pki" PKI="$SYSCONFDIR/pki"
INITCONFDIR="@initconfdir@"
if [ ! -d "$PKI" ] if [ ! -d "$PKI" ]
then then
echo the $PKI directory is missing, it is usually echo the $PKI directory is missing, it is usually
@ -294,24 +295,24 @@ fi
if [ "$SERVER" = "1" ] if [ "$SERVER" = "1" ]
then then
if [ -r "$SYSCONFDIR"/sysconfig/libvirtd ] if [ -r "$INITCONFDIR"/libvirtd ]
then then
if grep "^LIBVIRTD_ARGS.*--listen" "$SYSCONFDIR"/sysconfig/libvirtd \ if grep "^LIBVIRTD_ARGS.*--listen" "$INITCONFDIR"/libvirtd \
>/dev/null 2>&1 >/dev/null 2>&1
then then
: :
else else
echo Make sure "$SYSCONFDIR"/sysconfig/libvirtd is setup to listen to echo Make sure "$INITCONFDIR"/libvirtd is setup to listen to
echo TCP/IP connections and restart the libvirtd service echo TCP/IP connections and restart the libvirtd service
fi fi
fi fi
if [ -r "$SYSCONFDIR"/sysconfig/iptables ] if [ -r "$INITCONFDIR"/iptables ]
then then
if grep "$PORT" "$SYSCONFDIR"/sysconfig/iptables >/dev/null 2>&1 if grep "$PORT" "$INITCONFDIR"/iptables >/dev/null 2>&1
then then
: :
else else
echo Make sure "$SYSCONFDIR"/sysconfig/iptables is setup to allow echo Make sure "$INITCONFDIR"/iptables is setup to allow
echo incoming TCP/IP connections on port $PORT and echo incoming TCP/IP connections on port $PORT and
echo restart the iptables service echo restart the iptables service
fi fi