diff options
| author | Daniel Dragomir <Daniel.Dragomir@windriver.com> | 2021-01-07 03:53:35 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-01-10 23:24:08 -0500 |
| commit | c1cbfdd3952e3f112a1d16a3cdc2675d0d896a8f (patch) | |
| tree | 3515d33d96580e9fa15d55e68c8fdcc592d84aa4 | |
| parent | 7685c7d415e0002c448007960837ae8898cd57a5 (diff) | |
| download | meta-virtualization-c1cbfdd3952e3f112a1d16a3cdc2675d0d896a8f.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_3.1.0.bb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes-containers/lxc/lxc_3.1.0.bb b/recipes-containers/lxc/lxc_3.1.0.bb index 977583f2..235a4295 100644 --- a/recipes-containers/lxc/lxc_3.1.0.bb +++ b/recipes-containers/lxc/lxc_3.1.0.bb | |||
| @@ -167,9 +167,9 @@ pkg_postinst_${PN}() { | |||
| 167 | fi | 167 | fi |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | pkg_postinst_ontarget_${PN}-networking() { | 170 | pkg_postinst_${PN}-networking() { |
| 171 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 171 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 172 | cat >> /etc/network/interfaces << EOF | 172 | cat >> $D/etc/network/interfaces << EOF |
| 173 | 173 | ||
| 174 | auto lxcbr0 | 174 | auto lxcbr0 |
| 175 | iface lxcbr0 inet dhcp | 175 | iface lxcbr0 inet dhcp |
| @@ -178,7 +178,7 @@ iface lxcbr0 inet dhcp | |||
| 178 | bridge_maxwait 0 | 178 | bridge_maxwait 0 |
| 179 | EOF | 179 | EOF |
| 180 | 180 | ||
| 181 | cat<<EOF>/etc/network/if-pre-up.d/lxcbr0 | 181 | cat<<EOF>$D/etc/network/if-pre-up.d/lxcbr0 |
| 182 | #! /bin/sh | 182 | #! /bin/sh |
| 183 | 183 | ||
| 184 | if test "x\$IFACE" = xlxcbr0 ; then | 184 | if test "x\$IFACE" = xlxcbr0 ; then |
| @@ -191,6 +191,6 @@ if test "x\$IFACE" = xlxcbr0 ; then | |||
| 191 | fi | 191 | fi |
| 192 | fi | 192 | fi |
| 193 | EOF | 193 | EOF |
| 194 | chmod 755 /etc/network/if-pre-up.d/lxcbr0 | 194 | chmod 755 $D/etc/network/if-pre-up.d/lxcbr0 |
| 195 | fi | 195 | fi |
| 196 | } | 196 | } |
