Current BE-LFS (but w/ GCC 3.3.3) merged -> 6.0 branch
[linux_from_scratch.git] / bootscripts / contrib / new-boot-0.2 / sbin / init.d / runlevel.3 / ethernet
blobc710f631d3fcd96f26d8f6cefa2c41390adb19c1
1 #!/bin/sh
3 # set up network devices
6 #locate and source functions script
7 source `PATH=$INIT_D/:/sbin/init.d:/etc/init.d:/etc/rc.d type -p functions`
9 #sysconfig contains network parameters
10 source $sysconfig_nicconfig
12 case "$1" in
13 start)
14 i=0
15 while [ -n "${NET_DEVICE[$i]}" ]
17 if [ "${NET_ONBOOT[$i]}" = yes ]
18 then
19 echo "Bringing up the ${NET_DEVICE[$i]} interface..."
20 ifconfig "${NET_DEVICE[$i]}" ${NET_IP[$i]} \
21 broadcast ${NET_BROADCAST[$i]} netmask ${NET_MASK[$i]}
22 up_evaluate_retval
24 i=$(($i+1))
25 done
28 stop)
29 i=0
30 while [ -n "${NET_DEVICE[$i]}" ]
32 if [ "${NET_ONBOOT[$i]}" = yes ]
33 then
34 echo "Bringing down the ${NET_DEVICE[$i]} interface..."
35 ifconfig "${NET_DEVICE[$i]}" down
36 up_evaluate_retval
38 i=$(($i+1))
39 done
42 exit 1
44 esac
46 exit 0