mirror of
https://git.yoctoproject.org/poky
synced 2026-04-14 08:02:30 +02:00
ifupdown: create file interfaces if not exist
It fails to run ifup if /etc/network/interfaces doesn't exist: | ifup: couldn't open interfaces file "/etc/network/interfaces": No such | file or directory Create the config file if not exist. (From OE-Core rev: 4e692daf66d2c9d51d418706e20f4527505dc0bd) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -48,6 +48,13 @@ do_install_ptest () {
|
||||
cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget_${PN} () {
|
||||
if [ ! -f /etc/network/interfaces ]; then
|
||||
mkdir -p /etc/network
|
||||
touch /etc/network/interfaces
|
||||
fi
|
||||
}
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE_${PN} = "ifup ifdown"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user