OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / vendors / Arcturus / uC532x / rc.d / rc.net
1 #!/bin/sh
2
3 echo Configuring local network loopback
4 ifconfig lo inet 127.0.0.1 netmask 255.0.0.0
5
6 if [ "$IPADDR0" != "(null)" ]; then
7     if [ "$IPADDR0" = "dhcp" ]; then
8         /etc/rc.d/rc.dhcpc eth0
9     else
10         echo Configuring stored IP address $IPADDR0 on eth0
11         ifconfig eth0 inet $IPADDR0
12     fi
13 else
14     echo Configuring default IP address 192.168.1.200 on eth0
15     ifconfig eth0 inet 192.168.1.200 netmask 255.255.255.0
16 fi
17
18 # setup default routing through gateway
19 if [ "$GATEWAY" != "(null)" ]; then
20     echo Adding default route via $GATEWAY
21     route add -net default gw $GATEWAY
22 fi
23
24 # Add name server. Note again that this could
25 # be in addition to one set up by DHCP above
26 if [ "$NAMESERVER" != "(null)" ]; then
27     echo Adding name server $NAMESERVER
28     echo nameserver $NAMESERVER >> /etc/resolv.conf
29 fi
30
31 # Add DNS search path. Note again that this could
32 # be in addition to one set up by DHCP above
33 if [ "$SEARCHPATH" != "(null)" ]; then
34     echo Adding DNS search path: $SEARCHPATH
35     echo search $SEARCHPATH >> /etc/resolv.conf
36 fi
37
38 if [ "$NFSMOUNT" != "(null)" ]; then
39     echo NFS mounting $NFSMOUNT
40     portmap &
41     mount $NFSMOUNT
42 fi
43