diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2021-11-13 19:20:31 +0900 |
---|---|---|
committer | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2021-11-22 15:46:27 +0900 |
commit | cd255477e0fca7834d348963c9c1430db3a011a9 (patch) | |
tree | d1719bdfcc179f47f89c77afc54d173e307a154a /meta-agl-lxc/classes | |
parent | 035be1b50b5f7c3d9473d251dc1949c43edfeb00 (diff) |
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 <naoto.yamaguchi@aisin.co.jp>
Change-Id: I5da97492610124ddfe050660e0cc2c2c5559d5b9
Diffstat (limited to 'meta-agl-lxc/classes')
-rw-r--r-- | meta-agl-lxc/classes/lxc-config.bbclass | 14 |
1 files changed, 12 insertions, 2 deletions
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' \ |