mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 21:25:25 +00:00
meson: Use initconfdir
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
9850b37e39
commit
32f772e986
@ -42,7 +42,7 @@ FILES
|
||||
``libvirt-guests`` defines several variables to control service behavior.
|
||||
The default value of these variables can be overridden in:
|
||||
|
||||
* ``@SYSCONFDIR@/sysconfig/libvirt-guests``
|
||||
* ``@INITCONFDIR@/libvirt-guests``
|
||||
|
||||
The following variables are supported:
|
||||
|
||||
|
@ -88,6 +88,7 @@ endforeach
|
||||
docs_man_conf = configuration_data({
|
||||
'SYSCONFDIR': sysconfdir,
|
||||
'RUNSTATEDIR': runstatedir,
|
||||
'INITCONFDIR': initconfdir,
|
||||
'VERSION': meson.project_version(),
|
||||
})
|
||||
|
||||
|
@ -18,7 +18,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTCHD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtchd
|
||||
EnvironmentFile=-@initconfdir@/virtchd
|
||||
ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTINTERFACED_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
|
||||
EnvironmentFile=-@initconfdir@/virtinterfaced
|
||||
ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -19,7 +19,7 @@ ConditionPathExists=/proc/xen/capabilities
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTXEND_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
|
||||
EnvironmentFile=-@initconfdir@/virtxend
|
||||
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -8,7 +8,7 @@ Documentation=https://libvirt.org
|
||||
|
||||
[Service]
|
||||
Environment=VIRTLOCKD_ARGS=
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
|
||||
EnvironmentFile=-@initconfdir@/virtlockd
|
||||
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
|
||||
ExecReload=/bin/kill -USR1 $MAINPID
|
||||
# Losing the locks is a really bad thing that will
|
||||
|
@ -7,7 +7,7 @@ Documentation=man:virtlogd(8)
|
||||
Documentation=https://libvirt.org
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
|
||||
EnvironmentFile=-@initconfdir@/virtlogd
|
||||
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
|
||||
ExecReload=/bin/kill -USR1 $MAINPID
|
||||
# Losing the logs is a really bad thing that will
|
||||
|
@ -18,7 +18,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTLXCD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
|
||||
EnvironmentFile=-@initconfdir@/virtlxcd
|
||||
ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
|
@ -808,6 +808,7 @@ if conf.has('WITH_LIBVIRTD')
|
||||
'runstatedir': runstatedir,
|
||||
'sbindir': sbindir,
|
||||
'sysconfdir': sysconfdir,
|
||||
'initconfdir': initconfdir,
|
||||
'name': unit['name'],
|
||||
'service': unit['service'],
|
||||
'sockprefix': unit['sockprefix'],
|
||||
|
@ -17,7 +17,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTNETWORKD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
|
||||
EnvironmentFile=-@initconfdir@/virtnetworkd
|
||||
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTNODEDEVD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
|
||||
EnvironmentFile=-@initconfdir@/virtnodedevd
|
||||
ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTNWFILTERD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
|
||||
EnvironmentFile=-@initconfdir@/virtnwfilterd
|
||||
ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -20,7 +20,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTQEMUD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
|
||||
EnvironmentFile=-@initconfdir@/virtqemud
|
||||
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
|
@ -28,7 +28,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=LIBVIRTD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
|
||||
EnvironmentFile=-@initconfdir@/libvirtd
|
||||
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTPROXYD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
|
||||
EnvironmentFile=-@initconfdir@/virtproxyd
|
||||
ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTSECRETD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
|
||||
EnvironmentFile=-@initconfdir@/virtsecretd
|
||||
ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -16,7 +16,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTSTORAGED_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
|
||||
EnvironmentFile=-@initconfdir@/virtstoraged
|
||||
ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -15,7 +15,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTVBOXD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
|
||||
EnvironmentFile=-@initconfdir@/virtvboxd
|
||||
ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -15,7 +15,7 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=VIRTVZD_ARGS="--timeout 120"
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd
|
||||
EnvironmentFile=-@initconfdir@/virtvzd
|
||||
ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
@ -14,7 +14,7 @@ Documentation=man:libvirt-guests(8)
|
||||
Documentation=https://libvirt.org
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
|
||||
EnvironmentFile=-@initconfdir@/libvirt-guests
|
||||
# Hack just call traditional service until we factor
|
||||
# out the code
|
||||
ExecStart=@libexecdir@/libvirt-guests.sh start
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
sysconfdir="@sysconfdir@"
|
||||
localstatedir="@localstatedir@"
|
||||
initconfdir="@initconfdir@"
|
||||
libvirtd="@sbindir@"/libvirtd
|
||||
|
||||
# Source function library.
|
||||
@ -39,8 +40,8 @@ START_DELAY=0
|
||||
BYPASS_CACHE=0
|
||||
SYNC_TIME=0
|
||||
|
||||
test -f "$sysconfdir"/sysconfig/libvirt-guests &&
|
||||
. "$sysconfdir"/sysconfig/libvirt-guests
|
||||
test -f "$initconfdir"/libvirt-guests &&
|
||||
. "$initconfdir"/libvirt-guests
|
||||
|
||||
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
|
||||
VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
|
||||
|
@ -241,6 +241,7 @@ tools_conf = configuration_data({
|
||||
'sbindir': sbindir,
|
||||
'schemadir': pkgdatadir / 'schemas',
|
||||
'sysconfdir': sysconfdir,
|
||||
'initconfdir': initconfdir,
|
||||
})
|
||||
|
||||
configure_file(
|
||||
|
@ -73,6 +73,7 @@ echo Found "$CERTOOL"
|
||||
#
|
||||
SYSCONFDIR="@sysconfdir@"
|
||||
PKI="$SYSCONFDIR/pki"
|
||||
INITCONFDIR="@initconfdir@"
|
||||
if [ ! -d "$PKI" ]
|
||||
then
|
||||
echo the $PKI directory is missing, it is usually
|
||||
@ -294,24 +295,24 @@ fi
|
||||
|
||||
if [ "$SERVER" = "1" ]
|
||||
then
|
||||
if [ -r "$SYSCONFDIR"/sysconfig/libvirtd ]
|
||||
if [ -r "$INITCONFDIR"/libvirtd ]
|
||||
then
|
||||
if grep "^LIBVIRTD_ARGS.*--listen" "$SYSCONFDIR"/sysconfig/libvirtd \
|
||||
if grep "^LIBVIRTD_ARGS.*--listen" "$INITCONFDIR"/libvirtd \
|
||||
>/dev/null 2>&1
|
||||
then
|
||||
:
|
||||
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
|
||||
fi
|
||||
fi
|
||||
if [ -r "$SYSCONFDIR"/sysconfig/iptables ]
|
||||
if [ -r "$INITCONFDIR"/iptables ]
|
||||
then
|
||||
if grep "$PORT" "$SYSCONFDIR"/sysconfig/iptables >/dev/null 2>&1
|
||||
if grep "$PORT" "$INITCONFDIR"/iptables >/dev/null 2>&1
|
||||
then
|
||||
:
|
||||
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 restart the iptables service
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user