Current BE-LFS (but w/ GCC 3.3.3) merged -> 6.0 branch
[linux_from_scratch.git] / bootscripts / lfs / sysconfig / network-devices / ifdown
blob2fee829951255482635cad539e7e98b25264a8eb
1 #!/bin/sh
2 # Begin $network_devices/ifdown
4 # Written by Nathan Coulson <nathan@linuxfromscratch.org>
5 . /etc/sysconfig/rc
6 . $rc_functions
7 . $network_devices/ifconfig.$1
9 if [ -f $network_devices/ifdown-$1 ]
10 then
11 $network_devices/ifdown-$1
12 else
13 if [ -z $SERVICE ]
14 then
15 echo -n "SERVICE variable missing from ifconfig.$1, "
16 echo "using static"
17 SERVICE=static
19 if [ ! -f $network_devices/services/$SERVICE ]
20 then
21 echo -n "Unknown Service: $SERVICE, cannot continue"
22 exit 1
24 $network_devices/services/${SERVICE} $1 down
27 # End $network_devices/ifdown