[05/29] network: Allow passing custom options to dhcpcd
Commit Message
This is useful for debugging.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
src/initscripts/networking/functions.network | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -59,8 +59,9 @@ dhcpcd_is_running() {
dhcpcd_start() {
# This function will start a dhcpcd on a speciefied device.
-
local device="$1"
+ shift
+
local dhcp_start=()
boot_mesg -n "Starting dhcpcd on the ${device} interface..."
@@ -84,6 +85,9 @@ dhcpcd_start() {
dhcp_start+=( "--static" "mtu=${RED_DHCP_FORCE_MTU}" )
fi
+ # Append any further command line options
+ dhcp_start+=( $@ )
+
# Start dhcpcd.
/sbin/dhcpcd "${dhcp_start[@]}" ${device} >/dev/null 2>&1
ret="$?"