Send DHCP client-id for ma1.

This makes the requests the same as those issued by ONIE and the Loader,
both of which use udhcpc (which sends Option 61 by default).
This commit is contained in:
Jeffrey Townsend
2016-08-31 17:28:19 +00:00
parent a6cad524a8
commit 7714680845

View File

@@ -0,0 +1,18 @@
#!/bin/sh
############################################################
#
# Write /etc/dhcp/dhclient.conf with ma1 client-id.
#
############################################################
MA1_MAC=${MA1_MAC:-$(cat /sys/class/net/ma1/address)}
DHCLIENT_CONF=${DHCLIENT_CONF:-/etc/dhcp/dhclient.conf}
echo "interface \"ma1\" {" >> $DHCLIENT_CONF
echo " send dhcp-client-identifier 01:$MA1_MAC;" >> $DHCLIENT_CONF
echo "}" >> $DHCLIENT_CONF