Subject: bin/11996: Dhclient-script uses arp and sed before they are available
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/18/2001 12:33:19
>Number:         11996
>Category:       bin
>Synopsis:       Dhclient-script uses arp and sed from the /usr before usr is mounted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 18 12:36:00 PST 2001
>Originator:     Tero Kivinen
>Release:        NetBSD 1.5
SSH Communications Security
System: NetBSD 1.5 NetBSD 1.5 (SSH) #0: Tue Jan 2 23:32:28 EET 2001 i386


	If I fetch ip-address using dhclient on the boot, the
	dhclient-script will print out ugly error messages complaining
	that sed and arp are not found. This is because they are in
	the /usr/sbin, and dhclient is run before the /usr is mounted. 


	Configure dhclient=YES, but leave the rest of the
	configuration as default. The boot will print out "arp: not
	found" and "sed: not found" error messages. 


	Add check that arp and sed are available before using them,
	i.e modify the dhclient-script line:

	    arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' |sh

	to be

	   if [ -f /usr/sbin/arp ]; then
	     arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' |sh

	I don't think that piece of code is needed at all when getting
	the initial ip-address.