From 2cf44a2f03eab777fbf2ac2dfde47229eecfd2e1 Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Sat, 13 Nov 2021 19:20:31 +0900 Subject: Improvement flexibility for lxc-config Existing lxc config creation recipe is supporting two type string replacing. The network interface setting has required to multi line replacing at aec683913cd645fcf18d7633a12a7b4b42215f69. These flexibility will support by container manager that is under developing. But we need quick solution for that now. This patch provide quick solution. This patch support any network interface usage in guest. Bug-AGL: SPEC-4132 Signed-off-by: Naoto Yamaguchi Change-Id: I5da97492610124ddfe050660e0cc2c2c5559d5b9 --- meta-agl-lxc/classes/lxc-config.bbclass | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'meta-agl-lxc/classes/lxc-config.bbclass') diff --git a/meta-agl-lxc/classes/lxc-config.bbclass b/meta-agl-lxc/classes/lxc-config.bbclass index a3bdf802..921aaf92 100644 --- a/meta-agl-lxc/classes/lxc-config.bbclass +++ b/meta-agl-lxc/classes/lxc-config.bbclass @@ -18,8 +18,12 @@ python __anonymous() { bb.error('Recipe name does not start with \'lxc-config-\'') config = bpn[11:] d.setVar('LXC_CONFIG_NAME', config) - src_uri = 'file://config.' + config + \ - '.in file://system.conf.' + config + '.in' + src_uri = 'file://basic.in' \ + + ' file://mount.in' \ + + ' file://network.in' \ + + ' file://environment.in' \ + + ' file://misc.in' \ + + ' file://system.conf.' + config + '.in' d.setVar('SRC_URI', src_uri) } @@ -37,6 +41,12 @@ do_configure[noexec] = "1" do_compile[noexec] = "1" do_install () { + rm -f ${WORKDIR}/config.${LXC_CONFIG_NAME}.in + files="basic.in mount.in network.in environment.in misc.in" + for f in ${files}; do + cat ${WORKDIR}/$f >> ${WORKDIR}/config.${LXC_CONFIG_NAME}.in + done + install -m 0755 -d ${D}/var/lib/lxc/${LXC_CONFIG_NAME} for f in config.${LXC_CONFIG_NAME}.in system.conf.${LXC_CONFIG_NAME}.in; do sed -e 's|@DRM_LEASE_DEVICE@|${DRM_LEASE_DEVICE}|g' \ -- cgit 1.2.3-korg