From f6cfb92d54918c46dbc8673396333b50317cfb36 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Mon, 20 Nov 2017 21:52:34 -0600 Subject: rc.inet1*: Fix DHCP timeout This was accidentally changed from 15 seconds back to the 14.2 default of 10 seconds. Thanks to Eduard Rozenberg. --- netconfig | 2 +- rc.inet1 | 10 +++++----- rc.inet1.conf | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/netconfig b/netconfig index fbf3bc3..90aedde 100644 --- a/netconfig +++ b/netconfig @@ -131,7 +131,7 @@ DEBUG_ETH_UP="no" #MTU[4]="" # The default MTU is 1500, but you might need # 1360 when you use NAT'ed IPSec traffic. #DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to - # wait for server resonse is 10 seconds, but + # wait for server resonse is 15 seconds, but # you might want a shorter or longer wait. #DHCP_KEEPRESOLV[4]="yes" # If you don't want /etc/resolv.conf overwritten #DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten diff --git a/rc.inet1 b/rc.inet1 index 0ab1c6e..b3f3596 100644 --- a/rc.inet1 +++ b/rc.inet1 @@ -192,14 +192,14 @@ if_up() { # if [ "$CONNSTATUS" = "0" ]; then # # The kernel has just told us the cable isn't even plugged in, but we will # # give any DHCP server a short chance to reply anyway: - # echo "No carrier detected on ${1}. Reducing DHCP timeout to 10 seconds." - # DHCP_TIMEOUT[$i]=10 + # echo "No carrier detected on ${1}. Reducing DHCP timeout to 15 seconds." + # DHCP_TIMEOUT[$i]=15 # fi #fi #### (end commented out) - # 10 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]:-10} ${DHCP_OPTIONS} ${1}" | $LOGGER - /sbin/dhcpcd -L -t ${DHCP_TIMEOUT[$i]:-10} ${DHCP_OPTIONS} ${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 the dhcpcd call succeeds, add extra IP addresses, if defined, to interface if [ "$?" == "0" -a ! -z "${IPALIASES[$1]}" ]; then num=0 diff --git a/rc.inet1.conf b/rc.inet1.conf index 7577e7b..11e68ab 100644 --- a/rc.inet1.conf +++ b/rc.inet1.conf @@ -107,7 +107,7 @@ DEBUG_ETH_UP="no" #MTU[4]="" # The default MTU is 1500, but you might need # 1360 when you use NAT'ed IPSec traffic. #DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to - # wait for server resonse is 10 seconds, but + # wait for server resonse is 15 seconds, but # you might want a shorter or longer wait. #DHCP_KEEPRESOLV[4]="yes" # If you don't want /etc/resolv.conf overwritten #DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten -- cgit v1.2.3