mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
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>
This commit is contained in:
parent
29a8122f47
commit
33ebe1ac39
|
@ -173,9 +173,9 @@ pkg_postinst_${PN}() {
|
|||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget_${PN}-networking() {
|
||||
pkg_postinst_${PN}-networking() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
||||
cat >> /etc/network/interfaces << EOF
|
||||
cat >> $D/etc/network/interfaces << EOF
|
||||
|
||||
auto lxcbr0
|
||||
iface lxcbr0 inet dhcp
|
||||
|
@ -184,7 +184,7 @@ iface lxcbr0 inet dhcp
|
|||
bridge_maxwait 0
|
||||
EOF
|
||||
|
||||
cat<<EOF>/etc/network/if-pre-up.d/lxcbr0
|
||||
cat<<EOF>$D/etc/network/if-pre-up.d/lxcbr0
|
||||
#! /bin/sh
|
||||
|
||||
if test "x\$IFACE" = xlxcbr0 ; then
|
||||
|
@ -197,6 +197,6 @@ if test "x\$IFACE" = xlxcbr0 ; then
|
|||
fi
|
||||
fi
|
||||
EOF
|
||||
chmod 755 /etc/network/if-pre-up.d/lxcbr0
|
||||
chmod 755 $D/etc/network/if-pre-up.d/lxcbr0
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user