summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dragomir <Daniel.Dragomir@windriver.com>2021-01-07 03:53:36 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-01-10 23:24:02 -0500
commit92cd3467502bd27b98a76862ca6525ce425a8479 (patch)
treed859c3875a43a5a4be65a1d65f09d1d8587475b2
parentff997b6b3ba800978546098ab3cdaa113b6695e1 (diff)
downloadmeta-virtualization-92cd3467502bd27b98a76862ca6525ce425a8479.tar.gz
lxc: Fix postinstall script for read-only rootfs
Ensure postinstall script for lxc-networking package can run at build time for a read-only rootfs (with sysvinit). Signed-off-by: Daniel Dragomir <Daniel.Dragomir@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/lxc/lxc_4.0.1.bb8
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes-containers/lxc/lxc_4.0.1.bb b/recipes-containers/lxc/lxc_4.0.1.bb
index bfe003ca..807232e7 100644
--- a/recipes-containers/lxc/lxc_4.0.1.bb
+++ b/recipes-containers/lxc/lxc_4.0.1.bb
@@ -171,9 +171,9 @@ pkg_postinst_${PN}() {
171 fi 171 fi
172} 172}
173 173
174pkg_postinst_ontarget_${PN}-networking() { 174pkg_postinst_${PN}-networking() {
175if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 175if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
176cat >> /etc/network/interfaces << EOF 176cat >> $D/etc/network/interfaces << EOF
177 177
178auto lxcbr0 178auto lxcbr0
179iface lxcbr0 inet dhcp 179iface lxcbr0 inet dhcp
@@ -182,7 +182,7 @@ iface lxcbr0 inet dhcp
182 bridge_maxwait 0 182 bridge_maxwait 0
183EOF 183EOF
184 184
185cat<<EOF>/etc/network/if-pre-up.d/lxcbr0 185cat<<EOF>$D/etc/network/if-pre-up.d/lxcbr0
186#! /bin/sh 186#! /bin/sh
187 187
188if test "x\$IFACE" = xlxcbr0 ; then 188if test "x\$IFACE" = xlxcbr0 ; then
@@ -195,6 +195,6 @@ if test "x\$IFACE" = xlxcbr0 ; then
195 fi 195 fi
196fi 196fi
197EOF 197EOF
198chmod 755 /etc/network/if-pre-up.d/lxcbr0 198chmod 755 $D/etc/network/if-pre-up.d/lxcbr0
199fi 199fi
200} 200}