1993-06-20 15:41:45 +02:00
|
|
|
#!/bin/sh -
|
|
|
|
#
|
1994-11-07 05:02:26 +01:00
|
|
|
# $Id: netstart,v 1.16 1994/11/02 23:50:54 phk Exp $
|
1993-11-07 02:19:06 +01:00
|
|
|
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
|
1993-06-20 15:41:45 +02:00
|
|
|
|
1994-09-15 03:19:43 +02:00
|
|
|
defaultrouter=NO
|
1993-06-20 15:41:45 +02:00
|
|
|
routedflags=-q
|
1993-07-19 23:08:53 +02:00
|
|
|
timedflags=NO
|
1993-12-21 22:28:12 +01:00
|
|
|
xntpdflags="NO"
|
|
|
|
ntpdate="NO"
|
1993-06-20 15:41:45 +02:00
|
|
|
rwhod=NO
|
1993-11-07 02:19:06 +01:00
|
|
|
sendmail_flags="-bd -q30m"
|
1994-09-29 18:27:46 +01:00
|
|
|
amdflags="NO"
|
|
|
|
nfs_client=NO
|
|
|
|
nfs_server=NO
|
|
|
|
name_server=NO
|
1994-11-07 05:02:26 +01:00
|
|
|
savecore=NO
|
1993-07-19 23:08:53 +02:00
|
|
|
#kerberos_server=YES
|
|
|
|
#gated=YES
|
1993-06-20 15:41:45 +02:00
|
|
|
|
1993-07-19 23:08:53 +02:00
|
|
|
# my-name is my symbolic name
|
|
|
|
# my-netmask is specified in /etc/networks
|
1993-06-20 15:41:45 +02:00
|
|
|
#
|
1994-11-03 00:50:54 +01:00
|
|
|
if [ -z "`hostname -s`" ] ; then
|
|
|
|
hostname=`cat /etc/myname`
|
|
|
|
hostname $hostname
|
|
|
|
fi
|
1993-07-19 21:14:45 +02:00
|
|
|
|
1994-09-15 03:19:43 +02:00
|
|
|
for i in /etc/hostname.*
|
|
|
|
do
|
|
|
|
ifn=`expr $i : '/etc/hostname\.\(.*\)'`
|
|
|
|
if [ -e /etc/hostname.$ifn ]; then
|
|
|
|
if [ -e /etc/start_if.$ifn ]; then
|
|
|
|
sh /etc/start_if.$ifn $ifn
|
|
|
|
fi
|
|
|
|
ifconfig $ifn `cat /etc/hostname.$ifn`
|
|
|
|
ifconfig $ifn
|
|
|
|
fi
|
|
|
|
done
|
1993-06-20 15:41:45 +02:00
|
|
|
|
|
|
|
# set the address for the loopback interface
|
1993-07-19 21:14:45 +02:00
|
|
|
ifconfig lo0 inet localhost
|
1993-06-20 15:41:45 +02:00
|
|
|
|
1994-10-06 21:52:00 +01:00
|
|
|
# set interface for multicasts to default interface
|
|
|
|
# this needs to happen before router discovery
|
|
|
|
route add 224.0.0.0 -netmask 0xf0000000 -interface $hostname
|
|
|
|
|
1994-09-15 03:19:43 +02:00
|
|
|
if [ -n "$defaultrouter" -a "x$defaultrouter" != "xNO" ] ; then
|
|
|
|
route add default $defaultrouter
|
|
|
|
elif [ -f /etc/defaultrouter ] ; then
|
|
|
|
route add default `cat /etc/defaultrouter`
|
|
|
|
fi
|
|
|
|
|
1993-06-20 15:41:45 +02:00
|
|
|
# use loopback, not the wire
|
1993-07-19 23:08:53 +02:00
|
|
|
# route add $hostname localhost
|