aboutsummaryrefslogtreecommitdiffstats
path: root/package/6to4/files/6to4.hotplug
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-15 09:49:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-03-15 09:49:33 +0000
commit7dcb1402e59fde9501ef490ff26709468c5ba0a9 (patch)
tree42c1da1969b64df5000ed6eab9cba9254c515c13 /package/6to4/files/6to4.hotplug
parentb60539115ec05052c111bc5764f28f15d1171857 (diff)
downloadupstream-7dcb1402e59fde9501ef490ff26709468c5ba0a9.tar.gz
upstream-7dcb1402e59fde9501ef490ff26709468c5ba0a9.tar.bz2
upstream-7dcb1402e59fde9501ef490ff26709468c5ba0a9.zip
6to4: add netifd support
SVN-Revision: 30949
Diffstat (limited to 'package/6to4/files/6to4.hotplug')
-rw-r--r--package/6to4/files/6to4.hotplug13
1 files changed, 4 insertions, 9 deletions
diff --git a/package/6to4/files/6to4.hotplug b/package/6to4/files/6to4.hotplug
index 1e3d26c418..202a3c737c 100644
--- a/package/6to4/files/6to4.hotplug
+++ b/package/6to4/files/6to4.hotplug
@@ -3,6 +3,9 @@
if [ "$ACTION" = ifup ]; then
. /etc/functions.sh
+ INCLUDE_ONLY=1
+ . /lib/netifd/proto/6to4.sh
+
include /lib/network
scan_interfaces
@@ -19,15 +22,7 @@ if [ "$ACTION" = ifup ]; then
local wanip=$(find_6to4_wanip "$wandev")
- [ -n "$wanip" ] && {
- lsmod | grep -q ^sit || {
- logger -t 6to4 "Tunneling driver not loaded yet, deferring action"
- exit 0
- }
-
- uci_set_state network "$cfg" ipaddr "$wanip"
- ( ifup "$cfg" )&
- }
+ [ -n "$wanip" ] && ifup "$cfg"
}
config_foreach update_tunnel interface