[OE-core] [oe-core][RFC 0/2] busybox:udhcpc: option to skip the default route

Henning Heinold henning at itconsulting-heinold.de
Tue Sep 8 15:47:35 UTC 2015


* add an configuration option to the default file
  and simple.script for setting the default route
  or not
* this can be usefull if you already if a
  default route is already set via pppd
  or other network daemons

This work was sponsored by sysmocom GmbH

Signed-off-by: Henning Heinold <henning at itconsulting-heinold.de>
---
 meta/recipes-core/busybox/files/simple.script  | 2 +-
 meta/recipes-core/busybox/files/udhcpc.default | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 216a56f..1e247a5 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -45,7 +45,7 @@ case "$1" in
                         /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
                 fi
 
-		if [ -n "$router" ] ; then
+		if [ -n "$router" -a "$INSTALL_DEFAULT_ROUTE" != "no" ] ; then
 			if ! root_is_nfs ; then
                                 if [ $have_bin_ip -eq 1 ]; then
                                         while ip route del default dev $interface 2>/dev/null ; do
diff --git a/meta/recipes-core/busybox/files/udhcpc.default b/meta/recipes-core/busybox/files/udhcpc.default
index 2c42cf0..84bbbae 100644
--- a/meta/recipes-core/busybox/files/udhcpc.default
+++ b/meta/recipes-core/busybox/files/udhcpc.default
@@ -1,2 +1,5 @@
 # Uncomment the following line, if udhcpc should not touch /etc/resolv.conf
 #STATIC_DNS="yes"
+
+# Uncomment the following line if udhcpc should not install a default route
+#INSTALL_DEFAULT_ROUTE="no"
-- 
1.9.1



More information about the Openembedded-core mailing list