summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2020-03-23 10:24:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-24 16:39:40 +0000
commit4cd5ed73071dd9b853c0ab2ccbab420a538e81ea (patch)
tree80066b5daacf4db6fd98b34abc2d44fb9104d44f /meta/recipes-core
parent6c58c34a44d7ee37ac20f5b8d70b52af65af7fd1 (diff)
downloadpoky-4cd5ed73071dd9b853c0ab2ccbab420a538e81ea.tar.gz
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>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/ifupdown/ifupdown_0.8.35.bb7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
index 53cb971d33..a8913e6e29 100644
--- a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
+++ b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
@@ -48,6 +48,13 @@ do_install_ptest () {
48 cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/ 48 cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
49} 49}
50 50
51pkg_postinst_ontarget_${PN} () {
52 if [ ! -f /etc/network/interfaces ]; then
53 mkdir -p /etc/network
54 touch /etc/network/interfaces
55 fi
56}
57
51ALTERNATIVE_PRIORITY = "100" 58ALTERNATIVE_PRIORITY = "100"
52ALTERNATIVE_${PN} = "ifup ifdown" 59ALTERNATIVE_${PN} = "ifup ifdown"
53 60