38 lines
778 B
Plaintext
38 lines
778 B
Plaintext
# /usr/etc/inet/rc.net
|
|
# Linux networking startup script. Should be run by /etc/rc.local at
|
|
# boot time. Configures the interfaces and starts the deamons.
|
|
# It assumes hostname has been set.
|
|
#
|
|
#
|
|
HOSTS=/usr/etc/inet/hosts
|
|
CONFIG=/usr/etc/inet/config
|
|
INETD=/usr/etc/inet/inetd
|
|
NAMED=/usr/etc/inet/named
|
|
|
|
HOSTNAME=`hostname`
|
|
|
|
# This needs more testing and more diagnostics. */
|
|
IPADDR=`grep "[ ]$HOSTNAME[ \n\r]" $HOSTS | cut -f1`
|
|
|
|
echo "$HOSTNAME -> $IPADDR"
|
|
|
|
# Router, Should be set by configuration program.
|
|
#ROUTER#
|
|
|
|
#Net, should be set by configuration program
|
|
#NET#
|
|
|
|
|
|
$CONFIG loopback $IPADDR
|
|
$CONFIG loopback 127.0.0.1
|
|
$CONFIG -n $NET -r $ROUTER eth0 $IPADDR
|
|
|
|
if [ -x $INETD ]; then
|
|
echo starting $INETD
|
|
$INETD
|
|
fi
|
|
|
|
if [ -x $NAMED ]; then
|
|
echo staring $NAMED
|
|
$NAMED
|
|
fi |