5.0-pre2 release
[linux_from_scratch.git] / bootscripts / sysconfig / network-devices / ifup
blob0beecba696c5f5627503cac243a0130297930d46
1 #!/bin/sh
3 source /etc/sysconfig/rc
4 source $rc_functions
5 source $network_devices/ifconfig.$1
7 if [ -f $network_devices/ifup-$1 ]
8 then
9 $network_devices/ifup-$1
10 else
11 if [ -z $IP ]
12 then
13 echo "IP variable missing for ifconfig.$1, cannot continue"
14 exit 1
17 if [ -z $NETMASK ]
18 then
19 echo -n "NETMASK variable missing for ifconfig.$1, "
20 echo "using 255.255.255.0"
21 NETMASK=255.255.255.0
24 if [ -z $BROADCAST ]
25 then
26 echo -n "BROADCAST variable missing for ifconfig.$1, "
27 echo "using default address"
30 echo "Bringing up the $1 interface..."
31 ifconfig $1 $IP netmask $NETMASK broadcast $BROADCAST
32 evaluate_retval