diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2018-07-30 04:13:59 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2018-11-25 19:27:37 -0600 |
commit | 3a273172aebf1f0566e30cefab3454a7b498fa9b (patch) | |
tree | 3aaba6fa64c7953087fc3d5fb8f8782726c99412 /rc.inet1 | |
parent | 90b4dca0900c37b95a4fcfb0cff6ef87ff691aa2 (diff) | |
download | slacknetsetup-3a273172aebf1f0566e30cefab3454a7b498fa9b.tar.xz |
Add checks to enable -4 or -6 options to dhcpcd
This begins addressing concerns raised in af0a481ef072d220a58e
Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'rc.inet1')
-rw-r--r-- | rc.inet1 | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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") |