[package] ruby: fix path to libiconv
[openwrt/svn-archive/archive.git] / ipv6 / 6scripts / files / he-tun.ppp
1 #!/bin/sh
2
3 . /etc/functions.sh
4
5 ipaddr="$PPP_LOCAL"
6
7 update_tun() {
8 local cfg="$1"
9
10 config_get tunnelid "$cfg" tunnelid
11 config_get username "$cfg" username
12 config_get password "$cfg" password
13 config_get tunnel "$cfg" tunnel
14
15 password=`echo -n $password | md5sum | cut -d ' ' -f 1`
16 wget -q -O /dev/null "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$ipaddr&pass=$password&user_id=$username&tunnel_id=$tunnelid"
17
18 uci set "6tunnel.@$tunnel[0].localip4=$ipaddr"
19 uci commit 6tunnel
20 /etc/init.d/6tunnel restart
21 }
22
23 config_load "hetun"
24 config_foreach update_tun