Changeset 21644


Ignore:
Timestamp:
2010-05-31T14:17:42+02:00 (7 years ago)
Author:
kerneis
Message:

[package] ahcpd: Fix server mode (broken script)

Signed-off-by: Gabriel Kerneis <kerneis@…>

Location:
packages/ipv6/ahcpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/ipv6/ahcpd/Makefile

    r19813 r21644  
    1010PKG_NAME:=ahcpd 
    1111PKG_VERSION:=0.51 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/ipv6/ahcpd/files/ahcp.sh

    r19813 r21644  
    1818} 
    1919 
    20 append_args() { 
     20append_stmt() { 
    2121        local name="$1" 
    2222        local switch="$2" 
    23         append args "$switch $name" 
     23        append args "-C '$switch $name'" 
     24} 
     25 
     26append_opt_stmt() { 
     27        local section="$1" 
     28        local option="$2" 
     29        local switch="$3" 
     30        local _loctmp 
     31        config_get _loctmp "$section" "$option" 
     32        [ -z "$_loctmp" ] && return 0 
     33        append args "-C '$switch $_loctmp'" 
    2434} 
    2535 
     
    3343        local cfg="$1" 
    3444 
    35         append args "-C '" 
    36  
    37         append_parm "$cfg" 'mode' 'mode' 
    38         append_parm "$cfg" 'lease_dir' 'lease-dir' 
    39         config_list_foreach "$cfg" 'prefix' append_args 'prefix' 
    40         config_list_foreach "$cfg" 'name_server' append_args 'name-server' 
    41         config_list_foreach "$cfg" 'ntp_server' append_args 'ntp-server' 
    42  
    43         append args ' ' "'" 
     45        append_opt_stmt "$cfg" 'mode' 'mode' 
     46        append_opt_stmt "$cfg" 'lease_dir' 'lease-dir' 
     47        config_list_foreach "$cfg" 'prefix' append_stmt 'prefix' 
     48        config_list_foreach "$cfg" 'name_server' append_stmt 'name-server' 
     49        config_list_foreach "$cfg" 'ntp_server' append_stmt 'ntp-server' 
    4450 
    4551        append_parm "$cfg" 'id_file' '-i' 
Note: See TracChangeset for help on using the changeset viewer.