mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +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() {
|
dhcpcd_start() {
|
||||||
# This function will start a dhcpcd on a speciefied device.
|
# This function will start a dhcpcd on a speciefied device.
|
||||||
|
|
||||||
local device="$1"
|
local device="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
local dhcp_start=()
|
local dhcp_start=()
|
||||||
|
|
||||||
boot_mesg -n "Starting dhcpcd on the ${device} interface..."
|
boot_mesg -n "Starting dhcpcd on the ${device} interface..."
|
||||||
@@ -84,6 +85,9 @@ dhcpcd_start() {
|
|||||||
dhcp_start+=( "--static" "mtu=${RED_DHCP_FORCE_MTU}" )
|
dhcp_start+=( "--static" "mtu=${RED_DHCP_FORCE_MTU}" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Append any further command line options
|
||||||
|
dhcp_start+=( $@ )
|
||||||
|
|
||||||
# Start dhcpcd.
|
# Start dhcpcd.
|
||||||
/sbin/dhcpcd "${dhcp_start[@]}" ${device} >/dev/null 2>&1
|
/sbin/dhcpcd "${dhcp_start[@]}" ${device} >/dev/null 2>&1
|
||||||
ret="$?"
|
ret="$?"
|
||||||
|
|||||||
Reference in New Issue
Block a user