summaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/ipv6-support/files/ipv6.hotplug
blob: e3379b6b2c3737a4ac1cbc2e6d3e283270f362d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Copyright (c) 2012 OpenWrt.org
[ "$DEVICE" == "lo" ] && exit 0
. /lib/ipv6/support.sh

local mode
config_get mode "$INTERFACE" mode

case "$ACTION" in
	ifup)
		[ "$mode" != "downstream" ] && enable_static $INTERFACE $DEVICE
		[ "$mode" == "upstream" ] && enable_upstream $INTERFACE $DEVICE
		[ "$mode" == "downstream" ] && enable_downstream $INTERFACE $DEVICE
	;;
	ifdown)
		disable_interface $INTERFACE $DEVICE
	;;
esac