mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:37:35 +00:00
meson: Export LXC_DISTRO_SYSCONF
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
6105cc7f53
commit
299f3f80d2
@ -1,18 +1,10 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
fs = import('fs')
|
if distrosysconfdir != ''
|
||||||
if fs.is_dir('/etc/sysconfig')
|
|
||||||
configure_file(
|
configure_file(
|
||||||
configuration: conf,
|
configuration: conf,
|
||||||
input: 'lxc.in',
|
input: 'lxc.in',
|
||||||
output: 'lxc',
|
output: 'lxc',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(sysconfdir, 'sysconfig'))
|
install_dir: distrosysconfdir)
|
||||||
elif fs.is_dir('/etc/default')
|
|
||||||
configure_file(
|
|
||||||
configuration: conf,
|
|
||||||
input: 'lxc.in',
|
|
||||||
output: 'lxc',
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(sysconfdir, 'default'))
|
|
||||||
endif
|
endif
|
||||||
|
12
meson.build
12
meson.build
@ -115,6 +115,18 @@ conf.set_quoted('LXCTEMPLATEDIR', lxctemplatedir)
|
|||||||
conf.set_quoted('LXC_USERNIC_CONF', lxc_user_network_conf)
|
conf.set_quoted('LXC_USERNIC_CONF', lxc_user_network_conf)
|
||||||
conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
|
conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
|
||||||
|
|
||||||
|
# Set sysconfdir
|
||||||
|
fs = import('fs')
|
||||||
|
if fs.is_dir('/etc/sysconfig')
|
||||||
|
distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
|
||||||
|
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
||||||
|
elif fs.is_dir('/etc/default')
|
||||||
|
distrosysconfdir = join_paths(sysconfdir, 'default')
|
||||||
|
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
|
||||||
|
else
|
||||||
|
distrosysconfdir = ''
|
||||||
|
endif
|
||||||
|
|
||||||
# Custom configuration.
|
# Custom configuration.
|
||||||
cgrouppattern = get_option('cgroup-pattern')
|
cgrouppattern = get_option('cgroup-pattern')
|
||||||
init_script = get_option('init-script')
|
init_script = get_option('init-script')
|
||||||
|
Loading…
Reference in New Issue
Block a user