From: jow Date: Sun, 5 Feb 2012 03:26:06 +0000 (+0000) Subject: [packages_10.03.2] gw6c: merge r28923, r29199 X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=a736b930914e2bda5d648977e4873c8b7919bc99;p=10.03%2Fpackages.git [packages_10.03.2] gw6c: merge r28923, r29199 git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30173 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/ipv6/gw6c/Makefile b/ipv6/gw6c/Makefile index cce8e61..57beb32 100644 --- a/ipv6/gw6c/Makefile +++ b/ipv6/gw6c/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gw6c PKG_VERSION:=5.1 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://openwrt.linux-appliance.net/sources @@ -72,4 +72,8 @@ define Package/gw6c/install $(INSTALL_CONF) ./files/gw6c.config $(1)/etc/config/gw6c endef +define Package/gw6c/conffiles +/etc/config/gw6c +endef + $(eval $(call BuildPackage,gw6c)) diff --git a/ipv6/gw6c/files/gw6c.init b/ipv6/gw6c/files/gw6c.init index abc5d72..f311324 100755 --- a/ipv6/gw6c/files/gw6c.init +++ b/ipv6/gw6c/files/gw6c.init @@ -1,62 +1,67 @@ #!/bin/sh /etc/rc.common -#Copyright (C) 2007 RoadRunner.cx +# Copyright (C) 2007-2011 OpenWrt.org +# Copyright (C) 2007 RoadRunner.cx + START=52 +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + genconf() { - [ -f /etc/config/gw6c ] || { - echo "You are missing configuration file /etc/config/gw6c" - return 0 - } + [ -f /etc/config/gw6c ] || { + echo "You are missing configuration file /etc/config/gw6c" + return 1 + } + + config_load "gw6c" + + config_get DISABLED basic disabled + + [ "$DISABLED" == "1" ] && { + echo "You haven't edited your configuration file. Gateway6 is disabled." + return 1 + } + + config_get USERID basic userid + config_get PASSWORD basic passwd + config_get SERVER basic server + config_get AUTH_METHOD basic auth_method + + config_get HOST_TYPE routing host_type + config_get PREFIX_LEN routing prefixlen + config_get IF_PREFIX routing ifprefix + config_get DNS_SERVER routing dns_server + + config_get GW6C_CONF advanced gw6c_conf + config_get GW6C_DIR advanced gw6c_dir + config_get AUTO_RETRY advanced auto_retry + config_get RETRY_DELAY advanced retry_delay + config_get KEEPALIVE advanced keepalive + config_get KEEPALIVE_INTERVAL advanced interval + config_get TUNNEL_MODE advanced if_tunnel_mode + config_get IF_V6V4 advanced if_v6v4 + config_get IF_V6UDPV4 advanced if_v6udpv4 + config_get IF_V4V6 advanced if_v4v6 + config_get CLIENT_V4 advanced client_v4 + config_get CLIENT_V6 advanced client_v6 + config_get TEMPLATE advanced template + config_get PROXY_CLIENT advanced proxy_client + + config_get BROKER_LIST broker broker_list + config_get LAST_SERVER broker last_server + config_get ALWAYS_SAMESERV broker always_same_serv + + config_get LOG_CONSOLE logging log_console + config_get LOG_STDERR logging log_stderr + config_get LOG_FILE logging log_file + config_get LOG_SYSLOG logging log_syslog + config_get LOG_FILENAME logging log_filename + config_get LOG_ROTATE logging log_rotation + config_get LOG_MAXSIZE logging log_maxsize + config_get SYSLOG_FACILITY logging syslog_facility - config_load "gw6c" - - config_get DISABLED basic disabled - - [ "$DISABLED" == "1" ] && { - echo "You haven't edited your configuration file. Gateway6 is disabled." - return 0 - } - - config_get USERID basic userid - config_get PASSWORD basic passwd - config_get SERVER basic server - config_get AUTH_METHOD basic auth_method - - config_get HOST_TYPE routing host_type - config_get PREFIX_LEN routing prefixlen - config_get IF_PREFIX routing ifprefix - config_get DNS_SERVER routing dns_server - - config_get GW6C_CONF advanced gw6c_conf - config_get GW6C_DIR advanced gw6c_dir - config_get AUTO_RETRY advanced auto_retry - config_get RETRY_DELAY advanced retry_delay - config_get KEEPALIVE advanced keepalive - config_get KEEPALIVE_INTERVAL advanced interval - config_get TUNNEL_MODE advanced if_tunnel_mode - config_get IF_V6V4 advanced if_v6v4 - config_get IF_V6UDPV4 advanced if_v6udpv4 - config_get IF_V4V6 advanced if_v4v6 - config_get CLIENT_V4 advanced client_v4 - config_get CLIENT_V6 advanced client_v6 - config_get TEMPLATE advanced template - config_get PROXY_CLIENT advanced proxy_client - - config_get BROKER_LIST broker broker_list - config_get LAST_SERVER broker last_server - config_get ALWAYS_SAMESERV broker always_same_serv - - config_get LOG_CONSOLE logging log_console - config_get LOG_STDERR logging log_stderr - config_get LOG_FILE logging log_file - config_get LOG_SYSLOG logging log_syslog - config_get LOG_FILENAME logging log_filename - config_get LOG_ROTATE logging log_rotation - config_get LOG_MAXSIZE logging log_maxsize - config_get SYSLOG_FACILITY logging syslog_facility - - cat >$GW6C_CONF <$GW6C_CONF < /proc/sys/net/ipv6/conf/all/forwarding - } + service_stop /usr/sbin/gw6c && { + echo 0 > /proc/sys/net/ipv6/conf/all/forwarding + } }