Changeset 26482


Ignore:
Timestamp:
2011-04-05T17:09:26+02:00 (7 years ago)
Author:
acinonyx
Message:

[package] hostapd: add accounting configuration to hostapd uci script

Hello

This patch add accounting configuration in hostapd.sh
It also change "server, port, key" to "auth_server, auth_port, auth_secret" but keep backward compatibility
Please patch backfire & trunk

Thanks in advance.

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/hostapd/files/hostapd.sh

    r26288 r26482  
    6969                        # required fields? formats? 
    7070                        # hostapd is particular, maybe a default configuration for failures 
    71                         config_get server "$vif" server 
    72                         append "$var" "auth_server_addr=$server" "$N" 
    73                         config_get port "$vif" port 
    74                         port=${port:-1812} 
    75                         append "$var" "auth_server_port=$port" "$N" 
    76                         config_get secret "$vif" key 
    77                         append "$var" "auth_server_shared_secret=$secret" "$N" 
     71                        config_get auth_server "$vif" auth_server 
     72                        [ -z "$auth_server" ] && config_get auth_server "$vif" server 
     73                        append "$var" "auth_server_addr=$auth_server" "$N" 
     74                        config_get auth_port "$vif" auth_port 
     75                        [ -z "$auth_port" ] && config_get auth_port "$vif" port 
     76                        auth_port=${auth_port:-1812} 
     77                        append "$var" "auth_server_port=$auth_port" "$N" 
     78                        config_get auth_secret "$vif" auth_secret 
     79                        [ -z "$auth_secret" ] && config_get auth_secret "$vif" key 
     80                        append "$var" "auth_server_shared_secret=$auth_secret" "$N" 
     81                        config_get acct_server "$vif" acct_server 
     82                        [ -n "$acct_server" ] && append "$var" "acct_server_addr=$acct_server" "$N" 
     83                        config_get acct_port "$vif" acct_port 
     84                        [ -n "$acct_port" ] && acct_port=${acct_port:-1813} 
     85                        [ -n "$acct_port" ] && append "$var" "acct_server_port=$acct_port" "$N" 
     86                        config_get acct_secret "$vif" acct_secret 
     87                        [ -n "$acct_secret" ] && append "$var" "acct_server_shared_secret=$acct_secret" "$N" 
    7888                        config_get nasid "$vif" nasid 
    7989                        append "$var" "nas_identifier=$nasid" "$N" 
Note: See TracChangeset for help on using the changeset viewer.