DHCP related - What sets _INIT_NET_STRATEGY?

jeff at digitalpipe.net jeff at digitalpipe.net
Thu Oct 25 15:15:58 EDT 2001


Well, I now know why DHCP doesn't update the /etc/resolv.conf.  It's because 
_INIT_NET_STRATEGY is set to "none".  In /etc/init.d/inetsvc there is this 
little if statement:

if [ "$_INIT_NET_STRATEGY" = "dhcp" ]; then
        dnsdomain=`/sbin/dhcpinfo DNSdmain`
else
        dnsdomain=
fi

Which is then followed by:

if [ -n "$dnsdomain" ]; then

 <big snip>
	 /usr/bin/mv /tmp/resolv.conf.$$ /etc/resolv.conf
	 /usr/bin/chmod 644 /etc/resolv.conf
fi


So, if _INIT_NET_STRATEGY is not "dhcp" then the /etc/resolv.conf doesn't get 
edited.  My question is, where does _INIT_NET_STRATEGY get set and why isn't 
it dhcp?

Looks like it's set in: /etc/init.d/network:

        if [ "$_INIT_NET_IF" != "$primary" ]; then
                echo "starting DHCP on primary interface $primary"
                /sbin/ifconfig $primary auto-dhcp primary $cmdline

                #
                # diskfull machine which uses dhcp. Set strategy for
                # the use of the rest of this run level.
                #
                _INIT_NET_STRATEGY="dhcp"
                export _INIT_NET_STRATEGY
        fi

I can't find where $_INIT_NET_IF is defined though.

I must have something configured slightly wrong.

-Jeff




More information about the sunmanagers mailing list