From: andy@resi.waldorf-gmbh.de (Andreas Busse) Subject: Re: problem with /etc/route in NET-2 Date: 25 Jun 1993 15:13:39 GMT
In article <1993Jun23.154623.6471@news.mic.ucla.edu>, cliff@trifid.astro.ucla.edu (cliff UCLA Astronomy) writes:
|>
|>
|> I'm still struggling with installing NET-2 on my linux 99p10 box. I bypassed
|> the net startup (rc.inet1 and rc.inet2) to boot up my linux box. The SMC16
|> ethernet board is recognized and set to eth0.
|>
|> After it finishes booting I type the net startup commands by hand.
|> I used ifconfig to set up both lo and eth0. I then typed ifconfig without
|> any parameters and it should my settings correctly.
|>
|> I then type /etc/route to add loopback and ${MYHOST}. Everything is still
|> ok so I typed the /etc/route command to add a default router (ie
|> /etc/route add default gw router metric 1).
|>
|> And that's when my console screen locks up. Does anyone know whats happening?
|> Do I have a buggy route program? Should this work?
|>
|>
|> cliff
|>
|> cliff@trifid.astro.ucla.edu
Try this:
# Configure eth0 interface
echo $use_escapes "Configuring Interfaces ($IPADDR)\c"
ethif=`route -v 2>&1 | grep eth0 | head -n 1 | cut -f1`
if [ -z $ethif ]
then
echo $use_escape "eth0 \c"
$CONFIG eth0 $IPADDR
$ROUTE add default
fi
# Configure loopback interface
loif=`route -v 2>&1 | grep lo | head -n 1 | cut -f1`
if [ -z $loif ]
then
echo $use_escape "lo \c"
$CONFIG lo 127.0.0.1
$ROUTE add loopback
fi
echo " ... done"
Andy