diff options
| author | Yi Zhao <yi.zhao@eng.windriver.com> | 2023-06-28 21:41:25 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-28 23:02:50 +0100 |
| commit | 05dbe2e3b06b0328edb9ae1df9820d3f3bfffde5 (patch) | |
| tree | 7e278c702e6903e6a1770fc660c5997615db69c5 | |
| parent | 9400e5bd58cc1e73c2cf4e35ac0829d792e969ad (diff) | |
| download | poky-05dbe2e3b06b0328edb9ae1df9820d3f3bfffde5.tar.gz | |
ifupdown: install missing directories
There are four directories in which scripts can be placed which will
always be run for any interface during certain phases of ifup and ifdown
commands:
/etc/network/if-pre-up.d/
/etc/network/if-up.d/
/etc/network/if-down.d/
/etc/network/if-post-down.d/
Even if there are no scripts in these directories, ifup and ifdown
commands will also search these directories by using run-parts command.
Install these directories to fix the following runtime errors:
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
$ ifdown lo
ifdown: interface lo not configured
$ ifup lo
run-parts: failed to open directory /etc/network/if-up.d: No such file or directory
ifup: failed to bring up lo
(From OE-Core rev: 277bc7ab1fedd81f4df578e544ec381c819a10f9)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/ifupdown/ifupdown_0.8.41.bb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb b/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb index 5dbd6193b8..16425ea9e4 100644 --- a/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb +++ b/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb | |||
| @@ -42,6 +42,11 @@ do_install () { | |||
| 42 | install -m 0644 ifup.8 ${D}${mandir}/man8 | 42 | install -m 0644 ifup.8 ${D}${mandir}/man8 |
| 43 | install -m 0644 interfaces.5 ${D}${mandir}/man5 | 43 | install -m 0644 interfaces.5 ${D}${mandir}/man5 |
| 44 | cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8 | 44 | cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8 |
| 45 | |||
| 46 | install -d ${D}${sysconfdir}/network/if-pre-up.d | ||
| 47 | install -d ${D}${sysconfdir}/network/if-up.d | ||
| 48 | install -d ${D}${sysconfdir}/network/if-down.d | ||
| 49 | install -d ${D}${sysconfdir}/network/if-post-down.d | ||
| 45 | } | 50 | } |
| 46 | 51 | ||
| 47 | do_install_ptest () { | 52 | do_install_ptest () { |
