SUMMARY: DHCP on boot = no default route

jeff at digitalpipe.net jeff at digitalpipe.net
Thu Oct 25 14:21:17 EDT 2001


Thanks to those who responded.  It appears that the problem was me having a 
null /etc/defaultrouter.  I am running Solaris 5.8 and even though looking at 
the inetinit script seems to indicate that it ignores /etc/defaultrouter under 
DHCP, it still needs to not exist.  The only problem I continue to have 
is that /etc/resolv.conf only gets updated once in spite of looking at 
/etc/init.d/inetsvc and seeing that it should update it every time. Here's my 
working dhcp jumpstart postinstall subroutine (except that /etc/resolv.conf 
only gets updated on first boot and never thereafter).


##############################################################
###
### Usage: dhcp <interface>
###
### Turns on the dhcp client
###
##############################################################
dhcp()
{
	_interface="$1"
	echo "...setting up dhcp"
	
	/bin/cat /dev/null > ${_ROOT}/etc/hostname.${_interface}
	/bin/echo "wait 300" > ${_ROOT}/etc/dhcp.${_interface}
	/bin/cat /dev/null > ${_ROOT}/etc/resolv.conf
	[ -f ${_ROOT}/etc/defaultrouter ] && rm ${_ROOT}/etc/defaultrouter
	/bin/cat ${SI_CONFIG_DIR}/dhcp/dhcpagent > ${_ROOT}/etc/default/dhcpagent
	/bin/cat ${SI_CONFIG_DIR}/dhcp/hosts > ${_ROOT}/etc/hosts

}

The last line of ${SI_CONFIG_DIR}/dhcp/dhcpagent:

PARAM_REQUEST_LIST=1,3,6,12,15,43



${SI_CONFIG_DIR}/dhcp/hosts:

#
# Internet host table
#
127.0.0.1       localhost       loghost







More information about the sunmanagers mailing list