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
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
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
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