From b21cb37df05e7696464bead0c824538031e7e10f Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Mon, 30 Nov 2020 22:38:32 +0100 Subject: [PATCH] dhcp: Pass given config file to dhclient, if present Signed-off-by: Maximilian Wilhelm --- executor-scripts/linux/dhcp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/executor-scripts/linux/dhcp b/executor-scripts/linux/dhcp index 3d32a0b..30d1903 100755 --- a/executor-scripts/linux/dhcp +++ b/executor-scripts/linux/dhcp @@ -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)