mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-31 12:13:10 +00:00
Pulled in patch kit 0.2.4 netstart, added ifconfig ed0 line. This is a
crock so I can get the binaries released.
This commit is contained in:
parent
ca8687bd42
commit
54d88c88d6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160
89
etc/netstart
89
etc/netstart
@ -2,91 +2,28 @@
|
||||
#
|
||||
# @(#)netstart 5.9 (Berkeley) 3/30/91
|
||||
|
||||
# set these to "NO" to turn them off. otherwise, they're used as flags
|
||||
routedflags=-q
|
||||
timedflags=
|
||||
|
||||
# set the following to "YES" to turn them on
|
||||
timedflags=NO
|
||||
rwhod=NO
|
||||
nfs_server=NO
|
||||
nfs_client=NO
|
||||
name_server=NO
|
||||
gated=NO
|
||||
kerberos_server=NO
|
||||
#kerberos_server=YES
|
||||
#nfs_server=YES
|
||||
#name_server=YES
|
||||
#gated=YES
|
||||
|
||||
# /etc/myname contains my symbolic name
|
||||
# my-name is my symbolic name
|
||||
# my-netmask is specified in /etc/networks
|
||||
#
|
||||
hostname=`cat /etc/myname`
|
||||
hostname $hostname
|
||||
if [ -f /etc/defaultdomain ]; then
|
||||
domainname `cat /etc/defaultdomain`
|
||||
fi
|
||||
|
||||
# configure all of the interfaces which we know about.
|
||||
# do this by reading /etc/hostname.* files, where * is the name
|
||||
# of a given interface.
|
||||
#
|
||||
# these files are formatted like the following, but with no # at the
|
||||
# beginning of the line
|
||||
#
|
||||
# addr_family hostname netmask broadcast_addr options
|
||||
# dest dest_addr
|
||||
#
|
||||
# addr_family is the address family of the interface, generally inet
|
||||
# hostname is the host name that belongs to the interface, in /etc/hosts.
|
||||
# netmask is the network mask for the interface.
|
||||
# broadcast_addr is the broadcast address for the interface
|
||||
# options are misc. options to ifconfig for the interface.
|
||||
#
|
||||
# dest is simply the string "dest" (no quotes, though) if the interface
|
||||
# has a "destination" (i.e. it's a point-to-point link, like SLIP).
|
||||
# dest_addr is the hostname of the other end of the link, in /etc/hosts
|
||||
#
|
||||
# the only required contents of the file are the addr_family field
|
||||
# and the hostname.
|
||||
|
||||
(
|
||||
tmp="$IFS"
|
||||
IFS="$IFS."
|
||||
set `echo /etc/hostname.*`
|
||||
IFS=$tmp
|
||||
unset tmp
|
||||
|
||||
while [ $# -ge 2 ] ; do
|
||||
shift # get rid of "hostname"
|
||||
(
|
||||
read af name mask bcaddr extras
|
||||
read dt dtaddr
|
||||
|
||||
if [ ! -n "$name" ]; then
|
||||
echo "/etc/hostname.$1: invalid network configuration file"
|
||||
exit
|
||||
fi
|
||||
|
||||
cmd="ifconfig $1 $af $name "
|
||||
if [ "${dt}" = "dest" ]; then cmd="$cmd $dtaddr"; fi
|
||||
if [ -n "$mask" ]; then cmd="$cmd netmask $mask"; fi
|
||||
if [ -n "$bcaddr" ]; then cmd="$cmd broadcast $bcaddr"; fi
|
||||
cmd="$cmd $extras"
|
||||
|
||||
$cmd
|
||||
) < /etc/hostname.$1
|
||||
shift
|
||||
done
|
||||
)
|
||||
# ifconfig we0 inet $hostname netmask 447-ether
|
||||
# ifconfig ne0 inet $hostname netmask my-netmask
|
||||
# ifconfig ec0 inet $hostname netmask my-netmask
|
||||
# ifconfig is0 inet $hostname netmask my-netmask
|
||||
# ifconfig ed0 inet $hostname netwask my-netmask
|
||||
|
||||
# set the address for the loopback interface
|
||||
ifconfig lo0 inet localhost
|
||||
|
||||
# use loopback, not the wire
|
||||
route add $hostname localhost
|
||||
|
||||
# /etc/mygate, if it exists, contains the name of my gateway host
|
||||
# that name must be in /etc/hosts.
|
||||
if [ -f /etc/mygate ]; then
|
||||
route add default `cat /etc/mygate`
|
||||
fi
|
||||
|
||||
if [ -f /usr/sbin/ypbind -a -d /var/yp ]; then
|
||||
ypbind; echo ypbind
|
||||
fi
|
||||
# route add $hostname localhost
|
||||
|
Loading…
Reference in New Issue
Block a user