let ipkg fail when a package file to be installed is not found
[openwrt/svn-archive/archive.git] / openwrt / package / base-files / default / sbin / ifdown
1 #!/bin/sh
2 [ $# = 0 ] && { echo " $0 <group>"; exit; }
3 . /etc/functions.sh
4 . /etc/config/network
5
6 debug "### ifdown $type ###"
7 type=$1
8
9 eval "if_proto=\"\${${type}_proto}\""
10 eval "if=\"\${${type}_ifname}\""
11 [ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\""
12
13 case "$if_proto" in
14 pppoa) hotplug_dev unregister atm0; exit 0 ;;
15 ""|none) exit 0;;
16 esac
17
18 hotplug_dev unregister "$if"