aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/ipv6-support/files/ipv6.hotplug
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2012-11-29 20:14:28 +0000
committerSteven Barth <cyrus@openwrt.org>2012-11-29 20:14:28 +0000
commita4edea5ef3b6c19179f3232e3b8d2ed5a41bd163 (patch)
treeb99a769a9da7ec44dcb1307560f903b5e28263e7 /package/network/ipv6/ipv6-support/files/ipv6.hotplug
parente6e6e0d15246d930780ce7e95f214871a2568dbe (diff)
downloadupstream-a4edea5ef3b6c19179f3232e3b8d2ed5a41bd163.tar.gz
upstream-a4edea5ef3b6c19179f3232e3b8d2ed5a41bd163.tar.bz2
upstream-a4edea5ef3b6c19179f3232e3b8d2ed5a41bd163.zip
ipv6-support: Add new IPv6-support meta-package
SVN-Revision: 34422
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 0000000000..e3379b6b2c
--- /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