blob: 5a281a3b5c3904b09e8a7057561529b93c06144e [file] [log] [blame]
#!/bin/sh
DHCLIENT_CONF=/tmp/dhclient.conf
rm -f $DHCLIENT_CONF
cat >$DHCLIENT_CONF <<-EOF
retry 30;
request subnet-mask, broadcast-address, routers,
domain-name, domain-name-servers, ntp-servers;
send host-name "$(hostname)";
script "/sbin/dhclient-script";
EOF
# We don't want to send the client identifier on the tv box wcli0 as that
# will cause duplicate IP addresses on br0 and wcli0
if is-tv-box; then
cat >>$DHCLIENT_CONF <<-EOF
interface "br0" {
send dhcp-client-identifier "$(serial)";
}
EOF
else
echo "send dhcp-client-identifier \"$(serial)\";" >>$DHCLIENT_CONF
fi