diff mbox

[2/2] busybox: Add default value for UDHCPC and add useflag to set it

Message ID 52d270086392784996b8da56beb6c176fb4dfa8b.1398255328.git.christian.braunersorensen@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

christian.braunersorensen@prevas.dk April 23, 2014, 12:16 p.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

Use flag added: busybox_udhcpc6
Set it, to enable the udhcpc6 busybox client. Upon enabling it, IPV6 is
also enabled.

Signed-off-by: Christian Sørensen <christian.braunersorensen@prevas.dk>
---
 recipes/busybox/busybox-1.22.0/defconfig |  1 +
 recipes/busybox/busybox-configure.inc    | 13 +++++++++++++
 2 files changed, 14 insertions(+)

Comments

Esben Haabendal April 23, 2014, 12:42 p.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/recipes/busybox/busybox-1.22.0/defconfig b/recipes/busybox/busybox-1.22.0/defconfig
index e1ee0d7..2c15bab 100644
--- a/recipes/busybox/busybox-1.22.0/defconfig
+++ b/recipes/busybox/busybox-1.22.0/defconfig
@@ -816,6 +816,7 @@  CONFIG_ROUTE=y
 # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
 # CONFIG_TUNCTL is not set
 # CONFIG_FEATURE_TUNCTL_UG is not set
+# CONFIG_UDHCPC6 is not set
 # CONFIG_UDHCPD is not set
 # CONFIG_DHCPRELAY is not set
 # CONFIG_DUMPLEASES is not set
diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc
index 3e264e1..c67242e 100644
--- a/recipes/busybox/busybox-configure.inc
+++ b/recipes/busybox/busybox-configure.inc
@@ -284,6 +284,19 @@  do_configure_busybox_udhcpc () {
 }
 BUSYBOX_SIMPLE_USE_FLAGS += "udhcpc_rfc3397::CONFIG_FEATURE_UDHCP_RFC3397"
 
+RECIPE_FLAGS += "busybox_udhcpc6"
+# USE flag: enable udhcpc6 client
+DEFAULT_USE_busybox_udhcpc6 = "0"
+BUSYBOX_PROVIDES:>USE_busybox_udhcpc6 = " busybox-udhcpc6 dhcp-client6"
+DO_CONFIGURE_PREFUNCS:>USE_busybox_udhcpc6 = " do_configure_busybox_udhcpc6"
+do_configure_busybox_udhcpc6 () {
+        sed -i -e 's/^# \(CONFIG_FEATURE_IPV6\) is not set/\1=y/' \
+               -e 's/^# \(CONFIG_FEATURE_PREFER_IPV4_ADDRESS\) is not set/\1=y/' \
+               -e 's/^# \(CONFIG_FEATURE_IFUPDOWN_IPV6\) is not set/\1=y/' \
+               -e 's/^# \(CONFIG_UDHCPC6\) is not set/\1=y/' \
+        .config
+}
+
 RECIPE_FLAGS += "busybox_udhcpd \
         busybox_udhcpd_sysvinit_start busybox_udhcpd_sysvinit_stop"
 # USE flag: enable udhcp server