* [PATCH] ifupdown: install missing directories
@ 2023-06-28 13:41 Yi Zhao
0 siblings, 0 replies; only message in thread
From: Yi Zhao @ 2023-06-28 13:41 UTC (permalink / raw)
To: openembedded-core
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
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
meta/recipes-core/ifupdown/ifupdown_0.8.41.bb | 5 +++++
1 file changed, 5 insertions(+)
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 () {
install -m 0644 ifup.8 ${D}${mandir}/man8
install -m 0644 interfaces.5 ${D}${mandir}/man5
cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
+
+ install -d ${D}${sysconfdir}/network/if-pre-up.d
+ install -d ${D}${sysconfdir}/network/if-up.d
+ install -d ${D}${sysconfdir}/network/if-down.d
+ install -d ${D}${sysconfdir}/network/if-post-down.d
}
do_install_ptest () {
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-28 13:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 13:41 [PATCH] ifupdown: install missing directories Yi Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox