Changeset 30173


Ignore:
Timestamp:
2012-02-05T04:26:06+01:00 (6 years ago)
Author:
jow
Message:

[packages_10.03.2] gw6c: merge r28923, r29199

Location:
branches/packages_10.03.2/ipv6/gw6c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/packages_10.03.2/ipv6/gw6c/Makefile

    r27583 r30173  
    77PKG_NAME:=gw6c 
    88PKG_VERSION:=5.1 
    9 PKG_RELEASE:=1 
     9PKG_RELEASE:=3 
    1010 
    1111PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     
    7373endef 
    7474 
     75define Package/gw6c/conffiles 
     76/etc/config/gw6c 
     77endef 
     78 
    7579$(eval $(call BuildPackage,gw6c)) 
  • branches/packages_10.03.2/ipv6/gw6c/files/gw6c.init

    r13148 r30173  
    11#!/bin/sh /etc/rc.common 
    2 #Copyright (C) 2007 RoadRunner.cx 
     2# Copyright (C) 2007-2011 OpenWrt.org 
     3# Copyright (C) 2007 RoadRunner.cx 
     4 
    35START=52 
     6 
     7SERVICE_DAEMONIZE=1 
     8SERVICE_WRITE_PID=1 
    49 
    510genconf() { 
    611 
    7     [ -f /etc/config/gw6c ] || { 
    8         echo "You are missing configuration file /etc/config/gw6c" 
    9         return 0 
    10     } 
     12        [ -f /etc/config/gw6c ] || { 
     13                echo "You are missing configuration file /etc/config/gw6c" 
     14                return 1 
     15        } 
    1116 
    12     config_load "gw6c" 
    13      
    14     config_get DISABLED basic disabled 
    15      
    16     [ "$DISABLED" == "1" ] && { 
    17         echo "You haven't edited your configuration file. Gateway6 is disabled." 
    18         return 0 
    19     } 
    20      
    21     config_get USERID basic userid 
    22     config_get PASSWORD basic passwd 
    23     config_get SERVER basic server 
    24     config_get AUTH_METHOD basic auth_method 
    25      
    26     config_get HOST_TYPE routing host_type 
    27     config_get PREFIX_LEN routing prefixlen 
    28     config_get IF_PREFIX routing ifprefix 
    29     config_get DNS_SERVER routing dns_server 
    30      
    31     config_get GW6C_CONF advanced gw6c_conf 
    32     config_get GW6C_DIR advanced gw6c_dir 
    33     config_get AUTO_RETRY advanced auto_retry 
    34     config_get RETRY_DELAY advanced retry_delay 
    35     config_get KEEPALIVE advanced keepalive 
    36     config_get KEEPALIVE_INTERVAL advanced interval 
    37     config_get TUNNEL_MODE advanced if_tunnel_mode 
    38     config_get IF_V6V4 advanced if_v6v4 
    39     config_get IF_V6UDPV4 advanced if_v6udpv4 
    40     config_get IF_V4V6 advanced if_v4v6 
    41     config_get CLIENT_V4 advanced client_v4 
    42     config_get CLIENT_V6 advanced client_v6 
    43     config_get TEMPLATE advanced template 
    44     config_get PROXY_CLIENT advanced proxy_client 
    45      
    46     config_get BROKER_LIST broker broker_list 
    47     config_get LAST_SERVER broker last_server 
    48     config_get ALWAYS_SAMESERV broker always_same_serv 
    49      
    50     config_get LOG_CONSOLE logging log_console 
    51     config_get LOG_STDERR logging log_stderr 
    52     config_get LOG_FILE logging log_file 
    53     config_get LOG_SYSLOG logging log_syslog 
    54     config_get LOG_FILENAME logging log_filename 
    55     config_get LOG_ROTATE logging log_rotation 
    56     config_get LOG_MAXSIZE logging log_maxsize 
    57     config_get SYSLOG_FACILITY logging syslog_facility 
    58      
    59     cat >$GW6C_CONF <<EOF 
     17        config_load "gw6c" 
     18 
     19        config_get DISABLED basic disabled 
     20 
     21        [ "$DISABLED" == "1" ] && { 
     22                echo "You haven't edited your configuration file. Gateway6 is disabled." 
     23                return 1 
     24        } 
     25 
     26        config_get USERID basic userid 
     27        config_get PASSWORD basic passwd 
     28        config_get SERVER basic server 
     29        config_get AUTH_METHOD basic auth_method 
     30 
     31        config_get HOST_TYPE routing host_type 
     32        config_get PREFIX_LEN routing prefixlen 
     33        config_get IF_PREFIX routing ifprefix 
     34        config_get DNS_SERVER routing dns_server 
     35 
     36        config_get GW6C_CONF advanced gw6c_conf 
     37        config_get GW6C_DIR advanced gw6c_dir 
     38        config_get AUTO_RETRY advanced auto_retry 
     39        config_get RETRY_DELAY advanced retry_delay 
     40        config_get KEEPALIVE advanced keepalive 
     41        config_get KEEPALIVE_INTERVAL advanced interval 
     42        config_get TUNNEL_MODE advanced if_tunnel_mode 
     43        config_get IF_V6V4 advanced if_v6v4 
     44        config_get IF_V6UDPV4 advanced if_v6udpv4 
     45        config_get IF_V4V6 advanced if_v4v6 
     46        config_get CLIENT_V4 advanced client_v4 
     47        config_get CLIENT_V6 advanced client_v6 
     48        config_get TEMPLATE advanced template 
     49        config_get PROXY_CLIENT advanced proxy_client 
     50 
     51        config_get BROKER_LIST broker broker_list 
     52        config_get LAST_SERVER broker last_server 
     53        config_get ALWAYS_SAMESERV broker always_same_serv 
     54 
     55        config_get LOG_CONSOLE logging log_console 
     56        config_get LOG_STDERR logging log_stderr 
     57        config_get LOG_FILE logging log_file 
     58        config_get LOG_SYSLOG logging log_syslog 
     59        config_get LOG_FILENAME logging log_filename 
     60        config_get LOG_ROTATE logging log_rotation 
     61        config_get LOG_MAXSIZE logging log_maxsize 
     62        config_get SYSLOG_FACILITY logging syslog_facility 
     63 
     64        cat >$GW6C_CONF <<EOF 
    6065userid=$USERID 
    6166passwd=$PASSWORD 
     
    9499 
    95100start() { 
    96     genconf 
    97     if [ -z "$GW6C_CONF" ] || [ ! -f "$GW6C_CONF" ]; then 
    98         echo "Gateway6 client cannot start." 
    99     else 
    100         echo "Starting Gateway6 client." 
    101         /usr/sbin/gw6c -f "$GW6C_CONF" 
    102     fi 
     101        genconf 
     102        [ -n "$GW6C_CONF" ] || return 1 
     103        [ -f "$GW6C_CONF" ] || return 1 
     104        service_start /usr/sbin/gw6c -f "$GW6C_CONF" 
    103105} 
    104106 
    105107stop() { 
    106     [ `ps ax|grep -v grep|grep -c gw6c` != "0" ] && { 
    107     killall -q gw6c 
    108     [ `ps ax|grep -v grep|grep -c radvd` != "0" ] && killall -q radvd 
    109     echo 0 > /proc/sys/net/ipv6/conf/all/forwarding 
    110     } 
     108        service_stop /usr/sbin/gw6c && { 
     109                echo 0 > /proc/sys/net/ipv6/conf/all/forwarding 
     110        } 
    111111} 
Note: See TracChangeset for help on using the changeset viewer.