diff --git a/features.in/mipsel-bfk3/config.mk b/features.in/mipsel-bfk3/config.mk index 4c061c14..826345da 100644 --- a/features.in/mipsel-bfk3/config.mk +++ b/features.in/mipsel-bfk3/config.mk @@ -1,4 +1,4 @@ -use/mipsel-bfk3: use/kernel use/tty/S0 +use/mipsel-bfk3: use/kernel use/tty/S0 use/net-eth/dhcp/timeout/20 @$(call add_feature) @$(call set,KFLAVOURS,bfk3-def) @$(call set,VM_FSTYPE,ext2) diff --git a/features.in/mipsel-mitx/config.mk b/features.in/mipsel-mitx/config.mk index cca2d788..5232baab 100644 --- a/features.in/mipsel-mitx/config.mk +++ b/features.in/mipsel-mitx/config.mk @@ -1,4 +1,4 @@ -use/mipsel-mitx: use/kernel use/tty/S0 +use/mipsel-mitx: use/kernel use/tty/S0 use/net-eth/dhcp/timeout/20 @$(call add_feature) @$(call set,KFLAVOURS,mitx-xpa) @$(call add,THE_PACKAGES,alt-config-be-t) diff --git a/features.in/net-eth/config.mk b/features.in/net-eth/config.mk index 259896e8..dafd3a7f 100644 --- a/features.in/net-eth/config.mk +++ b/features.in/net-eth/config.mk @@ -16,6 +16,11 @@ use/net-eth/networkd: use/net/networkd # typical boilerplate use/net-eth/dhcp: use/net-eth use/net/dhcp @$(call add,NET_ETH,eth0:dhcp) + @$(call try,NET_ETH_TIMEOUT,7) + @$(call xport,NET_ETH_TIMEOUT) + +use/net-eth/dhcp/timeout/%: use/net-eth/dhcp + @$(call set,NET_ETH_TIMEOUT,$*) use/net-eth/networkd-dhcp: use/net-eth/networkd @$(call add,NET_ETH,eth0:dhcp) diff --git a/features.in/net-eth/rootfs/image-scripts.d/50-net-eth b/features.in/net-eth/rootfs/image-scripts.d/50-net-eth index 5e4ee2d4..92bde492 100755 --- a/features.in/net-eth/rootfs/image-scripts.d/50-net-eth +++ b/features.in/net-eth/rootfs/image-scripts.d/50-net-eth @@ -42,11 +42,7 @@ write_etcnet_iface() { append= case "$proto" in dhcp) - if [ $GLOBAL_ARCH = mipsel ]; then - append="DHCP_TIMEOUT=20" - else - append="DHCP_TIMEOUT=7" - fi + append="DHCP_TIMEOUT=$GLOBAL_NET_ETH_TIMEOUT" ;; static) echo "$ipv4addr" > "$dir/ipv4address"