John Polstra wrote:
> In article <[EMAIL PROTECTED]>,
> John Polstra  <[EMAIL PROTECTED]> wrote:
> > I've been setting up a 4.4-RELEASE system for net booting and diskless
> > operation with pxeboot, and I've run into a minor but annoying
> > problem.  It seems that if you boot with PXE you can't use dhclient.
> > pxeboot configures the relevant network interface (let's call it
> > fxp0), NFS-mounts the root filesystem, boots the kernel, etc., and
> > begins to enter multi-user mode.  The rc.network script then runs
> > dhclient, which tries to configure fxp0 (again).  It apparently starts
> > out by unconfiguring fxp0's IP address, because NFS immediately hangs
> > with a "host unreachable" error.  At that point I have to walk over
> > and press the reset button.
> 
> The patch below for dhclient-script fixes the problem for me.  If the
> script is about to change the IP address to 0.0.0.0 (in the PREINIT
> phase), the patched version first checks to see if the interface is
> already up.  If it is up, there is no need to reset its IP address.
> We are just trying to get the interface into a state where it
> can send IP packets, and it is already in that state.  Any
> objections?

IMHO, it would be better to provide a /etc/dhclient-enter-hooks
while you are net installing the station, then remove it when
finished.

the dhclient-enter-hooks would be almost what you are doing :

#!/bin/sh

if [ x$reason = xPREINIT ]; then
        case `ifconfig $interface` in
        *flags=*[\<,]UP[\>,]*) exit 0 ;;
        esac
fi

Cyrille.
-- 
Cyrille Lefevre                 mailto:[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to