Subject: still problems with dhclient not setting the path for dhclient-script
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 08/10/2000 10:42:31
We just tried upgrading a client machine to 1.5B and discovered that the
PATH is still not being set properly for /etc/dhclient-script.  I've
stared at the source again but I can't really see what's going wrong --
and indeed the right path is found in the binary (dhclient.c v1.31)....

Here's a slightly sanitized chop and paste of the output with "env" in
the top of /etc/dhclient-script.  Notice that there's no PATH in the
environment at all.  The default path setting from /bin/sh is all that's
available in the script, but of course that does not include /sbin....

	# /etc/rc.d/dhclient start 
	Starting dhclient.
	Internet Software Consortium DHCP Client V3.0b2pl0-20000719
	Copyright 1995-2000 Internet Software Consortium.
	All rights reserved.
	
	Please contribute if you find this software useful.
	For info, please visit http://www.isc.org/dhcp-contrib.html
	
	interface=ex0
	reason=PREINIT
	ifconfig: not found
	Listening on BPF/ex0/00:60:97:a7:40:61
	Sending on   BPF/ex0/00:60:97:a7:40:61
	Sending on   Socket/fallback
	DHCPREQUEST on ex0 to 255.255.255.255 port 67
	DHCPACK from 24.xx.xx.xx
	new_ip_address=24.xx.xx.xx
	new_network_number=24.xx.xx.0
	new_dhcp_message_type=5
	new_routers=24.xx.xx.1
	new_subnet_mask=255.255.255.0
	new_expiry=966088845
	interface=ex0
	new_domain_name=coppard.xxxxxxxxx.xxx xxxxxxxxx.xxx yyyyyyyy.yyy
	reason=REBOOT
	new_host_name=gw-coppard
	new_dhcp_server_identifier=24.xx.xx.xx
	new_domain_name_servers=127.0.0.1 24.66.126.33 24.66.126.35 24.66.126.34
	new_broadcast_address=255.255.255.255
	new_dhcp_lease_time=172800
	New Host Name: gw-coppard
	New Network Number: 24.xx.xx.0
	New Broadcast Address: 255.255.255.255
	ifconfig: not found
	route: not found
	route: not found
	bound to 24.xx.xx.xx -- renewal in 84992 seconds.

I'm still wondering why it's necessary to set the PATH in the
environment of the script instead of just having the script set it
itself, esp. from the point of view of the more portable sources....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>