summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2023-06-21 14:55:41 +0100
committerDarren 'Tadgy' Austin <darren@afterdark.org.uk>2023-06-21 14:55:41 +0100
commit5925f2bcc500f5198b5c00ab4e635a59bef7a413 (patch)
tree767a3b49a8549683af995b3a9e47fe2d579c896f /rc.inet1
parent8f43a741a36e59b8a9560ff2c4f3e5da2b8dd72b (diff)
downloadslacknetsetup-master.tar.xz
Add support for a DHCP_OPTS parameter.HEADmaster
This commit allows an interface specific DHCP_OPTS parameter to set additional dhcpcd command line options where they may be required on a local network. It is still recommended to use the supported DHCP_* options in preference to this option, but it is being added to aid customisations. Thanks to ljb643 on LQ for the bug report regarding DHCP_IPADDR and the suggestion of a DHCP_OPTS parameter.
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet11
1 files changed, 1 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index f998a21..8b03fb7 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -400,6 +400,7 @@ if_up() {
[ "${DHCP_KEEPGW[$i]}" = "yes" ] && DHCP_OPTIONS+=("-G")
[ -n "${DHCP_IPADDR[$i]}" ] && DHCP_OPTIONS+=("-r" "${DHCP_IPADDR[$i]}")
[ "${DHCP_DEBUG[$i]}" = "yes" ] && DHCP_OPTIONS+=("-d")
+ [ -n "${DHCP_OPTS[$i]}" ] && DHCP_OPTIONS+=(${DHCP_OPTS[$i]})
# The -L option used to be hard coded into the dhcpcd command line in -current. It was added to assist ARM users
# get networking up and running. Previous versions of Slackware did not have -L hard coded - the code here keeps
# the 14.2 behaviour, but can be altered to make the use of -L default as in -current. To change the behaviour,