summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rc.inet15
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 2de26df..5cb4d0c 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -175,6 +175,11 @@ if_up() {
unset DHCP_OPTIONS
declare -a DHCP_OPTIONS
# Set DHCP_OPTIONS for this interface:
+ if [ "${USE_DHCP[$i]}" = "yes" ] && [ "${USE_DHCP6[$i]}" != "yes" ]; then # only try v4 dhcp
+ DHCP_OPTIONS+=("-4")
+ elif [ "${USE_DHCP[$i]}" != "yes" ] && [ "${USE_DHCP6[$i]}" = "yes" ]; then # only try v6 dhcp
+ DHCP_OPTIONS+=("-6")
+ fi
[ -n "${DHCP_HOSTNAME[$i]}" ] && DHCP_OPTIONS+=("-h" "${DHCP_HOSTNAME[$i]}")
[ "${DHCP_KEEPRESOLV[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "resolv.conf")
[ "${DHCP_KEEPNTP[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "ntp.conf")