ipv6-support: Add new IPv6-support meta-package
[openwrt/svn-archive/archive.git] / package / network / ipv6 / ipv6-support / files / ipv6.hotplug
1 #!/bin/sh
2 # Copyright (c) 2012 OpenWrt.org
3 [ "$DEVICE" == "lo" ] && exit 0
4 . /lib/ipv6/support.sh
5
6 local mode
7 config_get mode "$INTERFACE" mode
8
9 case "$ACTION" in
10 ifup)
11 [ "$mode" != "downstream" ] && enable_static $INTERFACE $DEVICE
12 [ "$mode" == "upstream" ] && enable_upstream $INTERFACE $DEVICE
13 [ "$mode" == "downstream" ] && enable_downstream $INTERFACE $DEVICE
14 ;;
15 ifdown)
16 disable_interface $INTERFACE $DEVICE
17 ;;
18 esac