From: Jo-Philipp Wich Date: Wed, 11 Jul 2012 12:17:46 +0000 (+0000) Subject: aiccu: remove complete integration, only leave the binary X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=675b4e812b661cf15b14d79e1662f06eaf1821ed;p=openwrt%2Fsvn-archive%2Fpackages.git aiccu: remove complete integration, only leave the binary According to its own author, aiccu is broken on nat gateways, not meant for unattended operation and in the need for a hardware rtc to function properly. Since restarting aiccu or attempting to work around those problems violate the sixxs terms of service, this commit removes any non-necessary patches and any scripts shipped with it. Users having trouble with aiccu may contact the sixxs staff for assistance. SVN-Revision: 32666 --- diff --git a/ipv6/aiccu/Makefile b/ipv6/aiccu/Makefile index 6dca950c2..8ba1f09ca 100644 --- a/ipv6/aiccu/Makefile +++ b/ipv6/aiccu/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aiccu PKG_VERSION:=20070115 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk define Package/aiccu SECTION:=ipv6 CATEGORY:=IPv6 - DEPENDS:=+libpthread +ip +kmod-sit +kmod-tun + DEPENDS:=+libpthread TITLE:=SixXS Automatic IPv6 Connectivity Client Utility URL:=http://www.sixxs.net/tools/aiccu/ endef @@ -46,10 +46,6 @@ endef define Package/aiccu/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/aiccu.config $(1)/etc/config/aiccu - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/aiccu.init $(1)/etc/init.d/aiccu endef $(eval $(call BuildPackage,aiccu)) diff --git a/ipv6/aiccu/files/aiccu.config b/ipv6/aiccu/files/aiccu.config deleted file mode 100755 index 671fd16da..000000000 --- a/ipv6/aiccu/files/aiccu.config +++ /dev/null @@ -1,11 +0,0 @@ -config aiccu - option username '' - option password '' - option protocol '' - option server '' - option interface '' - option tunnel_id '' - option requiretls '' - option defaultroute '1' - option nat '1' - option heartbeat '1' diff --git a/ipv6/aiccu/files/aiccu.init b/ipv6/aiccu/files/aiccu.init deleted file mode 100644 index fae1ae554..000000000 --- a/ipv6/aiccu/files/aiccu.init +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org -START=51 - -add_config_bool() { - local section="$1" - local option="$2" - local value="$3" - local default="$4" - local _val - - config_get_bool _val "$section" "$option" "$default" - [ "$_val" -gt 0 ] && _val="true" || _val="false" - append args "$3 $_val" "\n" -} - -add_config() { - local section="$1" - local option="$2" - local value="$3" - local _val - - config_get _val "$section" "$option" - [ -n "$_val" ] && append args "$3 $_val" "\n" -} - -start_instance() { - local cfg="$1" - CFGFILE="/var/etc/aiccu-${cfg}.conf" - PIDFILE="/var/run/aiccu-${cfg}.pid" - args="" - - add_config "$cfg" username username - add_config "$cfg" password password - add_config "$cfg" server server - add_config "$cfg" protocol protocol - add_config "$cfg" interface ipv6_interface - add_config "$cfg" tunnel_id tunnel_id - add_config_bool "$cfg" requiretls requiretls 0 - add_config_bool "$cfg" defaultroute defaultroute 1 - add_config_bool "$cfg" nat behindnat 1 - add_config_bool "$cfg" heartbeat makebeats 1 - append args "daemonize true" "\n" - append args "pidfile $PIDFILE" "\n" - - mkdir -p /var/run /var/etc - echo -e "$args" > "$CFGFILE" - - config_get_bool enabled "$cfg" enabled '1' - [ "$enabled" -gt 0 ] && aiccu start "$CFGFILE" & -} - -stop_instance() { - local cfg="$1" - aiccu stop "/var/etc/aiccu-${cfg}.conf" -} - -restart_instance() { - local cfg="$1" - config_get_bool restart "$cfg" restart 0 - [ "$restart" -eq 1 ] && stop_instance "$cfg" - start_instance "$cfg" -} - -start() { - config_load aiccu - config_foreach start_instance aiccu -} - -stop() { - config_load aiccu - config_foreach stop_instance aiccu -} - -restart() { - config_load aiccu - config_foreach restart_instance aiccu -} diff --git a/ipv6/aiccu/patches/400-retry-on-time-or-network-failure.patch b/ipv6/aiccu/patches/400-retry-on-time-or-network-failure.patch deleted file mode 100644 index 5d9a6f22a..000000000 --- a/ipv6/aiccu/patches/400-retry-on-time-or-network-failure.patch +++ /dev/null @@ -1,111 +0,0 @@ ---- a/common/tic.c -+++ b/common/tic.c -@@ -60,7 +60,7 @@ int tic_checktime(time_t epochtime) - return 0; - } - --bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server) -+bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server, bool *fatal) - { - char buf[1024], sSignature[33], sChallenge[1024]; - int i; -@@ -74,6 +74,7 @@ bool tic_Login(struct TIC_conf *tic, con - #endif - - D(dolog(LOG_DEBUG, "Trying to connect to TIC server %s\n", server)); -+ *fatal = false; - - /* Connect to the TIC server */ - tic->sock = connect_client(server, TIC_PORT, AF_INET, SOCK_STREAM); -@@ -166,6 +167,7 @@ bool tic_Login(struct TIC_conf *tic, con - if (buf[0] != '2') - { - dolog(LOG_ERR, "Time not available? %s\n", &buf[4]); -+ *fatal = true; - return false; - } - -@@ -199,6 +201,7 @@ bool tic_Login(struct TIC_conf *tic, con - if (g_aiccu->requiretls) - { - dolog(LOG_ERR, "TIC Server does not support TLS and TLS is required\n"); -+ *fatal = true; - return false; - } - if (g_aiccu->verbose) dolog(LOG_WARNING, "TIC Server does not support TLS but TLS is not required, continuing\n"); -@@ -217,6 +220,7 @@ bool tic_Login(struct TIC_conf *tic, con - if (buf[0] != '2') - { - dolog(LOG_ERR, "Username not accepted: %s.\n", &buf[4]); -+ *fatal = true; - return false; - } - -@@ -231,6 +235,7 @@ bool tic_Login(struct TIC_conf *tic, con - if (buf[0] != '2') - { - dolog(LOG_ERR, "Challenge not correct: %s.\n", &buf[4]); -+ *fatal = true; - return false; - } - -@@ -252,6 +257,7 @@ bool tic_Login(struct TIC_conf *tic, con - { - tic_Logout(tic, NULL); - dolog(LOG_ERR, "Response not accepted: %s.\n", &buf[4]); -+ *fatal = true; - return false; - } - ---- a/unix-console/main.c -+++ b/unix-console/main.c -@@ -76,8 +76,9 @@ int list_tunnels(void); - int list_tunnels(void) - { - struct TIC_sTunnel *hsTunnel, *t; -+ bool is_fatal = false; - -- if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server)) return 0; -+ if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server, &is_fatal)) return 0; - - hsTunnel = tic_ListTunnels(g_aiccu->tic); - -@@ -153,9 +154,26 @@ struct TIC_Tunnel *get_tunnel(void) - - struct TIC_sTunnel *hsTunnel, *t; - struct TIC_Tunnel *hTunnel; -+ bool is_fatal = false; -+ int retry_intv = 10; - - /* Login to the TIC Server */ -- if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server)) return NULL; -+ while (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server, &is_fatal)) -+ { -+ if (!is_fatal) -+ { -+ dolog(LOG_ERR, "Retrying TIC login in %d seconds...\n", retry_intv); -+ sleep(retry_intv); -+ -+ if (retry_intv < 120) -+ retry_intv += 10; -+ } -+ else -+ { -+ dolog(LOG_ERR, "Fatal error occured during login, aborting\n"); -+ return NULL; -+ } -+ } - - /* - * Don't try to list the tunnels when ---- a/common/tic.h -+++ b/common/tic.h -@@ -120,7 +120,7 @@ struct TIC_conf - **********************************************************/ - - /* Login to/Logout from the TIC Server */ --bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server); -+bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server, bool *fatal); - void tic_Logout(struct TIC_conf *tic, const char *quitmsg); - - /* Check if the time is in range */