mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 10:35:53 +02:00
network: Allow passing custom options to dhcpcd
This is useful for debugging. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
33d2aa6d02
commit
c6551e73c2
@@ -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="$?"
|
||||
|
||||
Reference in New Issue
Block a user