Browse Source

rp-pppoe: support for enabled uci parameters

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
lilik-openwrt-22.03
Alin Nastac 7 years ago
parent
commit
26f8225d0a
2 changed files with 13 additions and 5 deletions
  1. +6
    -2
      net/rp-pppoe/files/pppoe-relay.init
  2. +7
    -3
      net/rp-pppoe/files/pppoe-server.init

+ 6
- 2
net/rp-pppoe/files/pppoe-relay.init View File

@ -7,7 +7,9 @@ USE_PROCD=1
pppoe_triggers() {
local cfg="$1"
local interface server_interfaces client_interfaces both_interfaces
local enabled interface server_interfaces client_interfaces both_interfaces
config_get_bool enabled "$cfg" enabled 1
[ "$enabled" -gt 0 ] || return 0
config_get server_interfaces "$cfg" server_interface
config_get client_interfaces "$cfg" client_interface
config_get both_interfaces "$cfg" both_interfaces
@ -24,7 +26,9 @@ pppoe_triggers() {
pppoe_relay_instance() {
local cfg="$1"
local interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS
local enabled interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS
config_get_bool enabled "$cfg" enabled 1
[ "$enabled" -gt 0 ] || return 0
config_get server_interfaces "$cfg" server_interface
config_get client_interfaces "$cfg" client_interface
config_get both_interfaces "$cfg" both_interfaces


+ 7
- 3
net/rp-pppoe/files/pppoe-server.init View File

@ -7,13 +7,17 @@ USE_PROCD=1
pppoe_triggers() {
local cfg="$1"
local interface
local enabled interface
config_get_bool enabled "$cfg" enabled 1
[ "$enabled" -gt 0 ] || return 0
config_get interface "$cfg" interface
}
pppoe_instance() {
local cfg="$1"
local interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS
local enabled interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS
config_get_bool enabled "$cfg" enabled 1
[ "$enabled" -gt 0 ] || return 0
config_get interface "$cfg" interface
config_get ac_name "$cfg" ac_name
config_get service_names "$cfg" service_name
@ -28,7 +32,7 @@ pppoe_instance() {
config_get timeout "$cfg" timeout
config_get mss "$cfg" mss
config_get_bool sync "$cfg" sync 0
config_get use_non_uci_config "$cfg" use_non_uci_config 0
config_get_bool use_non_uci_config "$cfg" use_non_uci_config 0
if [ "$use_non_uci_config" -gt 0 ]; then
. /etc/default/pppoe-server


Loading…
Cancel
Save