summaryrefslogtreecommitdiffstats
path: root/meta-agl-lxc/classes
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2021-11-13 19:20:31 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2021-11-22 12:08:27 +0900
commit2cf44a2f03eab777fbf2ac2dfde47229eecfd2e1 (patch)
treeee7d0075bc2697e5e7386d2bf881a77b16292704 /meta-agl-lxc/classes
parentd8ab3ff4c17bc7638f366822ca7907fd58edff42 (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.bbclass14
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' \