From: Steven Barth Date: Thu, 24 Jan 2013 11:41:40 +0000 (+0000) Subject: Kill obsoleted 6scripts X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=57565efb1b0867afad0871c20da2437fc6621023;p=openwrt%2Fsvn-archive%2Farchive.git Kill obsoleted 6scripts SVN-Revision: 35313 --- diff --git a/ipv6/6scripts/Makefile b/ipv6/6scripts/Makefile deleted file mode 100644 index 434e75673f..0000000000 --- a/ipv6/6scripts/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2007-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=6scripts -PKG_VERSION:=0.1 -PKG_RELEASE:=7 - -include $(INCLUDE_DIR)/package.mk - -define Package/6scripts - SECTION:=ipv6 - CATEGORY:=IPv6 - DEPENDS:=+kmod-ipv6 - TITLE:=IPv6 scripts - PKGARCH:=all -endef - -define Package/6scripts/description -IPv6 scripts to setup ipv6 connectivy using 6to4 tunnels -or bridged ipv6 connectivity. -endef - -define Package/6scripts/conffiles -/etc/config/6tunnel -/etc/config/6bridge -endef - -define Build/Compile -endef - -define Build/Configure -endef - -define Package/6scripts/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/6tunnel.conf $(1)/etc/config/6tunnel - $(INSTALL_DATA) ./files/6bridge.conf $(1)/etc/config/6bridge - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/6tunnel.init $(1)/etc/init.d/6tunnel - $(INSTALL_BIN) ./files/6bridge.init $(1)/etc/init.d/6bridge - $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d/ - $(INSTALL_DATA) ./files/he-tun.ppp $(1)/etc/ppp/ip-up.d/ -endef - -$(eval $(call BuildPackage,6scripts)) diff --git a/ipv6/6scripts/files/6bridge.conf b/ipv6/6scripts/files/6bridge.conf deleted file mode 100644 index e2980ad650..0000000000 --- a/ipv6/6scripts/files/6bridge.conf +++ /dev/null @@ -1,2 +0,0 @@ -config 6bridge - option bridge 'bripv6' diff --git a/ipv6/6scripts/files/6bridge.init b/ipv6/6scripts/files/6bridge.init deleted file mode 100644 index 94e3993c98..0000000000 --- a/ipv6/6scripts/files/6bridge.init +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=46 -STOP=46 - -start_service() { - local section="$1" - - . /lib/functions/network.sh - - network_get_physdev LAN lan || return 1 - network_get_physdev WAN wan || return 1 - config_get bridge "$section" bridge - - brctl addbr $bridge - brctl addif $bridge $LAN - brctl addif $bridge $WAN - brctl setfd $bridge 0 - - ebtables -t broute -A BROUTING -i $WAN -p ! ipv6 -j DROP - ifconfig $bridge up -} - -stop_service() { - local section="$1" - - . /lib/functions/network.sh - - network_get_physdev LAN lan || return 1 - network_get_physdev WAN wan || return 1 - config_get bridge "$section" bridge - - ifconfig $bridge down - ebtables -t broute -F - - brctl delif $bridge $WAN - brctl delif $bridge $LAN - brctl delbr $bridge -} - -start() { - if ! [ -f /proc/net/if_inet6 ]; then - echo "IPv6 not enabled, install kmod-ipv6"; - exit 1 - fi - config_load "6bridge" - config_foreach start_service 6bridge -} - -stop() { - config_load "6bridge" - config_foreach stop_service 6bridge -} diff --git a/ipv6/6scripts/files/6tunnel.conf b/ipv6/6scripts/files/6tunnel.conf deleted file mode 100644 index f65691dfd5..0000000000 --- a/ipv6/6scripts/files/6tunnel.conf +++ /dev/null @@ -1,18 +0,0 @@ -config 6tunnel - option tnlifname 'sixbone' - # provide your tunnel providers' ipv4 address - option remoteip4 '' - # provide your public ipv4 address - option localip4 '' - # provide your local ipv6 address including prefix, - # eg. 2001:610::2/64 - option localip6 '' - # provide your tunnel providers' ipv6 address excluding - # prefix, eg. 2001:610::1 - option remoteip6 '' - # this should provide an mtu for your tunnel interface - option mtu '1280' - # this should provide a ttl for your tunnel interface - option ttl '64' - # provide your tunnel provider's delegated block (/64 or /48) - option delegatedip6 '' diff --git a/ipv6/6scripts/files/6tunnel.init b/ipv6/6scripts/files/6tunnel.init deleted file mode 100644 index 06ca29b29e..0000000000 --- a/ipv6/6scripts/files/6tunnel.init +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=46 -STOP=46 - -start_service() { - local section="$1" - - . /lib/functions/network.sh - - network_get_device LAN lan || return 1 - config_get tnlifname "$section" tnlifname - config_get remoteip4 "$section" remoteip4 - config_get localip4 "$section" localip4 - config_get localip6 "$section" localip6 - config_get remoteip6 "$section" remoteip6 - config_get ttl "$section" ttl - config_get mtu "$section" mtu - config_get delegatedip6 "$section" delegatedip6 - - ip tunnel add $tnlifname mode sit remote $remoteip4 local $localip4 ttl 255 - ifconfig $tnlifname up - ip link set mtu $mtu dev $tnlifname - ip tunnel change $tnlifname ttl $ttl - ip addr add $localip6 dev $tnlifname - ip -6 route add ::/0 dev $tnlifname - ip -6 route add 2000::/3 via $remoteip6 - ip -6 route add $delegatedip6 dev $LAN -} - -stop_service() { - local section="$1" - - . /lib/functions/network.sh - - network_get_device LAN lan || return 1 - config_get tnlifname "$section" tnlifname - config_get remoteip4 "$section" remoteip4 - config_get localip4 "$section" localip4 - config_get localip6 "$section" localip6 - config_get remoteip6 "$section" remoteip6 - config_get ttl "$section" ttl - config_get mtu "$section" mtu - config_get delegatedip6 "$section" delegatedip6 - - ip -6 ro del $delegatedip6 dev $LAN - ip -6 ro del 2000::/3 via $remoteip6 - ip -6 ro del ::/0 dev $tnlifname - ip addr del $localip6 dev $tnlifname - ifconfig $tnlifname down - ip tunnel del $tnlifname -} -start() { - if ! [ -x /usr/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 -} diff --git a/ipv6/6scripts/files/he-tun.ppp b/ipv6/6scripts/files/he-tun.ppp deleted file mode 100644 index ab12d40dab..0000000000 --- a/ipv6/6scripts/files/he-tun.ppp +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh - -ipaddr="$PPP_LOCAL" - -update_tun() { - local cfg="$1" - - config_get tunnelid "$cfg" tunnelid - config_get username "$cfg" username - config_get password "$cfg" password - config_get tunnel "$cfg" tunnel - - password=`echo -n $password | md5sum | cut -d ' ' -f 1` - wget -q -O /dev/null "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$ipaddr&pass=$password&user_id=$username&tunnel_id=$tunnelid" - - uci set "6tunnel.@$tunnel[0].localip4=$ipaddr" - uci commit 6tunnel - /etc/init.d/6tunnel restart -} - -config_load "hetun" -config_foreach update_tun