diff options
author | Daniel Dragomir <Daniel.Dragomir@windriver.com> | 2021-01-07 03:53:37 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-01-10 23:23:55 -0500 |
commit | 33ebe1ac39bd1a4d1594413b7e5a89698149352b (patch) | |
tree | 14943ae61e08f42d22a2312f1409d1a63df8cfab | |
parent | 29a8122f479c7ae1a7200f4f0e692b5af8283209 (diff) | |
download | meta-virtualization-33ebe1ac39bd1a4d1594413b7e5a89698149352b.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.4.bb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes-containers/lxc/lxc_4.0.4.bb b/recipes-containers/lxc/lxc_4.0.4.bb index 4ef5fc0f..19b40f6b 100644 --- a/recipes-containers/lxc/lxc_4.0.4.bb +++ b/recipes-containers/lxc/lxc_4.0.4.bb | |||
@@ -173,9 +173,9 @@ pkg_postinst_${PN}() { | |||
173 | fi | 173 | fi |
174 | } | 174 | } |
175 | 175 | ||
176 | pkg_postinst_ontarget_${PN}-networking() { | 176 | pkg_postinst_${PN}-networking() { |
177 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 177 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
178 | cat >> /etc/network/interfaces << EOF | 178 | cat >> $D/etc/network/interfaces << EOF |
179 | 179 | ||
180 | auto lxcbr0 | 180 | auto lxcbr0 |
181 | iface lxcbr0 inet dhcp | 181 | iface lxcbr0 inet dhcp |
@@ -184,7 +184,7 @@ iface lxcbr0 inet dhcp | |||
184 | bridge_maxwait 0 | 184 | bridge_maxwait 0 |
185 | EOF | 185 | EOF |
186 | 186 | ||
187 | cat<<EOF>/etc/network/if-pre-up.d/lxcbr0 | 187 | cat<<EOF>$D/etc/network/if-pre-up.d/lxcbr0 |
188 | #! /bin/sh | 188 | #! /bin/sh |
189 | 189 | ||
190 | if test "x\$IFACE" = xlxcbr0 ; then | 190 | if test "x\$IFACE" = xlxcbr0 ; then |
@@ -197,6 +197,6 @@ if test "x\$IFACE" = xlxcbr0 ; then | |||
197 | fi | 197 | fi |
198 | fi | 198 | fi |
199 | EOF | 199 | EOF |
200 | chmod 755 /etc/network/if-pre-up.d/lxcbr0 | 200 | chmod 755 $D/etc/network/if-pre-up.d/lxcbr0 |
201 | fi | 201 | fi |
202 | } | 202 | } |