dhcp: Pass given config file to dhclient, if present

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-11-30 22:38:32 +01:00
parent aada42795c
commit b21cb37df0

View file

@ -21,7 +21,12 @@ start() {
${MOCK} /sbin/dhcpcd $optargs $IFACE
;;
dhclient)
${MOCK} /usr/sbin/dhclient -pf /var/run/dhclient.$IFACE.pid $IFACE
# Specific config file given?
if [ -n "$IF_DHCP_CONFIG" ]; then
optargs="$optargs -cf $IF_DHCP_CONFIG"
fi
${MOCK} /usr/sbin/dhclient -pf /var/run/dhclient.$IFACE.pid $optarts $IFACE
;;
udhcpc)
optargs=$(eval echo $IF_UDHCPC_OPTS)