Hi!

I have big problems with my network setup. I get my IP-Adress
from a DHCP Server (which works fine) but my default route
never gets set. After digging for a while I found the reason
for it in the ifup-Skript in /etc/sysconfig/ifup.
(I can't say if this worked in Mandrake 7.1, but it worked in
older distributions like RH6.2).
Here are the offending lines with my comments:
Starting with line 110:

DHCP_ARGS=
if [ "XXX$DHCP_CLIENT" != "XXX" ];then
case $(basename $DHCP_CLIENT) in
    dhcpcd)
    [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
    [ -n "$NEEDHOSTNAME" ] && DHCP_ARGS="$DHCP_ARGS -H"
    DHCP_ARGS="$DHCP_ARGS $DEVICE"
    ;;
    pump)
    [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
    [ -n "$NEEDHOSTNAME" ] && DHCP_ARGS="$DHCP_ARGS --lookup-hostname"
    DHCP_ARGS="$DHCP_ARGS -i $DEVICE"
    ;;
    dhcpxd)
    # Dhcpxd don't support NEED_HOSTNAME ? guess i need time to patch
    # this animal
    [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-H $HOSTNAME"
    DHCP_ARGS="$DHCP_ARGS $DEVICE"
    ;;
    dhclient)
    # Can't specify a host with dhclient ? same remark for
    # $NEEDHOSTNAME this client suck !!!
    DHCP_ARGS="$DEVICE"
    ;;
esac
fi

As you see, DHCP_ARGS never get a hint of the default gateway.
and now what comes next (line 138):

if [ -n "$DYNCONFIG" ]; then
    echo -n "Determining IP information for $DEVICE via $(basename $DHCP_CLIENT)..."
    if $DHCP_CLIENT $DHCP_ARGS ; then
        echo " done."
    else
        echo " failed."
        exit 1
    fi
else 
    if [ -z "$NETMASK" ]; then

...

in this else part the GATEWAY variable from /etc/sysconfig/network
is used for adding the route but as I use DHCP is used this never gets
reached. To correct this bug you have to move line 169 - 178 out of the 
else clause. (I don't see any reason why this is done in such a way).

Best regards,

Reinhard Katzman
--
E-Mail: [EMAIL PROTECTED]

Reply via email to