aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-10-27 07:12:13 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-10-27 07:12:13 +0000
commit131d358fc3585edf4968e657914c22a2040ad2e7 (patch)
treeacbd49d4ddf7768e54277c8d97c6a32c67a5e9c2
parent773c31afdcd77564d10cc7b622344d0eb8884758 (diff)
downloadupstream-131d358fc3585edf4968e657914c22a2040ad2e7.tar.gz
upstream-131d358fc3585edf4968e657914c22a2040ad2e7.tar.bz2
upstream-131d358fc3585edf4968e657914c22a2040ad2e7.zip
6tunnel: move init/config files to the right place
SVN-Revision: 9453
-rw-r--r--package/base-files/files/etc/config/6tunnel6
-rwxr-xr-xpackage/base-files/files/etc/init.d/6tunnel64
2 files changed, 0 insertions, 70 deletions
diff --git a/package/base-files/files/etc/config/6tunnel b/package/base-files/files/etc/config/6tunnel
deleted file mode 100644
index efd8f817c7..0000000000
--- a/package/base-files/files/etc/config/6tunnel
+++ /dev/null
@@ -1,6 +0,0 @@
-config 6tunnel
- option tnlifname 'sixbone'
- option remoteip4 ''
- option localip4 ''
- option localip6 ''
- option prefix '/64'
diff --git a/package/base-files/files/etc/init.d/6tunnel b/package/base-files/files/etc/init.d/6tunnel
deleted file mode 100755
index cd4e1fc027..0000000000
--- a/package/base-files/files/etc/init.d/6tunnel
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=46
-STOP=46
-
-start_service() {
- local section="$1"
-
- include /lib/network
- scan_interfaces
- config_load /var/state/network
-
- config_get LAN lan ifname
- config_get tnlifname "$section" tnlifname
- config_get remoteip4 "$section" remoteip4
- config_get localip4 "$section" localip4
- config_get localip6 "$section" localip6
- config_get prefix "$section" prefix
-
- ip tunnel add $tnlifname mode sit remote $remoteip4 local $localip4 ttl 255
- ifconfig $tnlifname up
- ip addr add $localip6 dev $tnlifname
- ip route add ::/0 dev $tnlifname
- ip route add 2000::/3 dev $tnlifname
- ip -6 addr add $prefix dev $LAN
-}
-
-stop_service() {
- local section="$1"
-
- include /lib/network
- scan_interfaces
- config_load /var/state/network
-
- config_get LAN lan ifname
- config_get tnlifname "$section" tnlifname
- config_get remoteip4 "$section" remoteip4
- config_get localip4 "$section" localip4
- config_get localip6 "$section" localip6
- config_get prefix "$section" prefix
-
- ip -6 addr del $prefix dev $LAN
- ip -6 ro del 2000::/3 dev $tnlifname
- ip -6 ro del ::/0 dev $tnlifname
- ip addr del $localip6 dev $tnlifname
- ifconfig $tnlifname down
- ip tunnel del $tnlifname
-}
-start() {
- if ! [ -f /proc/net/if_inet6 ]; then
- echo "IPv6 not enabled, install kmod-ipv6";
- exit 1;
- fi
- if ! [ -x /sbin/ip ]; then
- echo "ip is required to setup the tunnel";
- exit 1;
- fi
- config_load "6tunnel"
- config_foreach start_service 6tunnel
-}
-
-stop () {
- config_load "6tunnel"
- config_foreach stop_service 6tunnel
-}