[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new bootdisks uploaded



> ifconfig lo 127.0.0.1
> route add -net 127.0.0.0
> IPADDR=129.88.33.95
> NETMASK=255.255.255.0
> NETWORK=129.88.33.0
> BROADCAST=129.88.33.255
> GATEWAY=129.88.33.253
> ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
> route add -net ${NETWORK}
> [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
> 
> The GATEWAY adressed have been entered at installation time. If the
> route add command is rejected by the kernel, how do it knows this
> address. (especialy in this case where this adress is not
> 129.88.33.254 as often is but 129.88.33.253)

I guess it's just the first "route add" that gives the error.

It presumably doesn't need to know NETWORK because NETWORK == IPADDR &
NETMASK.

But can anyone think of how to write that script so that it works on
both 2.0.x and 2.2.x kernels without giving ugly errors?

I'm sure there's a better solution that this:

if ! /sbin/route | grep -q "${NETWORK} " - ; then
route add -net ${NETWORK}
fi

Is Debian 2.1 finished, by the way?

Edmund


Reply to: