From: Ted Lemon Date: Fri, 28 Mar 1997 23:59:56 +0000 (+0000) Subject: Don't have ARP code look up names; net_netmask_arg, not new_subnet_arg X-Git-Tag: DHCP-970328~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=73694cd227d786d57a634c23f2486997792945a6;p=thirdparty%2Fdhcp.git Don't have ARP code look up names; net_netmask_arg, not new_subnet_arg --- diff --git a/client/scripts/netbsd b/client/scripts/netbsd index 01d82f120..270323210 100755 --- a/client/scripts/netbsd +++ b/client/scripts/netbsd @@ -51,11 +51,11 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ for router in $old_routers; do route delete default $router >/dev/null 2>&1 done - arp -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' |sh + arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' |sh fi if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - ifconfig $interface inet $new_ip_address $new_subnet_arg \ + ifconfig $interface inet $new_ip_address $new_netmask_arg \ $new_broadcast_arg $medium route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do @@ -85,7 +85,8 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then for router in $old_routers; do route delete default $router >/dev/null 2>&1 done - arp -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' |sh >/dev/null 2>&1 + arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p'i \ + |sh >/dev/null 2>&1 fi if [ x$alias_ip_address != x ]; then ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg @@ -101,6 +102,7 @@ if [ x$reason = xTIMEOUT ]; then fi ifconfig $interface inet $new_ip_address $new_netmask_arg \ $new_broadcast_arg $medium + sleep 1 set $new_routers if ping -q -c 1 -w 1 $1; then if [ x$new_ip_address != x$alias_ip_address ] && \ @@ -126,7 +128,8 @@ if [ x$reason = xTIMEOUT ]; then for router in $old_routers; do route delete default $router >/dev/null 2>&1 done - arp -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' |sh >/dev/null 2>&1 + arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \ + |sh >/dev/null 2>&1 exit 1 fi