summaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/ipv6-support/files/ipv6.hotplug
diff options
context:
space:
mode:
authorcyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-29 20:14:28 +0000
committercyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-29 20:14:28 +0000
commit5789fd018b80a460f45f3a58005db4442fa2175b (patch)
treed7fa26cca29081ccca295685b44ed419a5400c7d /package/network/ipv6/ipv6-support/files/ipv6.hotplug
parentc5d1f4f669e8bef4dd6c94d5cc2c90ac46e7a2f6 (diff)
ipv6-support: Add new IPv6-support meta-package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34422 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/ipv6-support/files/ipv6.hotplug')
-rw-r--r--package/network/ipv6/ipv6-support/files/ipv6.hotplug18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/network/ipv6/ipv6-support/files/ipv6.hotplug b/package/network/ipv6/ipv6-support/files/ipv6.hotplug
new file mode 100644
index 000000000..e3379b6b2
--- /dev/null
+++ b/package/network/ipv6/ipv6-support/files/ipv6.hotplug
@@ -0,0 +1,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