Commit 09274529 authored by Darren 'Tadgy' Austin's avatar Darren 'Tadgy' Austin

Finish up dhcp start block.

parent f7fe9a2c
......@@ -169,9 +169,8 @@ if_up() {
. /etc/rc.d/rc.wireless ${1} start
fi
IF_UP=0
# Slackware historically favours DHCP over fixed IP to configure interfaces, so keep that tradition.
# Slackware historically favours DHCP over fixed IP to configure interfaces, so keep that tradition:
if [ "${USE_DHCP[$i]}" = "yes" ] || [ "${USE_DHCP6[$i]}" = "yes" ]; then # use dhcpcd to bring interface up
# FIXME: This block needs some attention after talking to Robby:
# Disable v6 IP auto configuration before trying to set up the interface:
[ "${USE_DHCP6[$i]}" = "yes" ] && echo "0" >/proc/sys/net/ipv6/conf/$1/autoconf
# Declare DHCP_OPTIONS array before adding new options to it:
......@@ -192,8 +191,11 @@ if_up() {
echo "Polling for DHCP server on interface ${1}:"
# 15 seconds should be a reasonable default DHCP timeout. 30 was too much.
echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -L -t ${DHCP_TIMEOUT[$i]:-15} ${DHCP_OPTIONS[@]} ${1}" | $LOGGER
/sbin/dhcpcd -L -t "${DHCP_TIMEOUT[$i]:-15}" "${DHCP_OPTIONS[@]}" ${1}
IF_UP=1
if /sbin/dhcpcd -L -t "${DHCP_TIMEOUT[$i]:-15}" "${DHCP_OPTIONS[@]}" ${1}; then
IF_UP=1
else
echo "/etc/rc.d/rc.inet1: failed to obtain DHCP lease for ${1}" | $LOGGER
fi
fi
if [ "${USE_DHCP[$i]}" != "yes" ] && [ -n "${IPADDR[$i]}" ]; then # use a fixed v4 IP to bring interface up
if [ -z "${NETMASK[$i]}"; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment