rp-pppoe: fix pppoe-server init script

There were 2 missing "$" when options "maxsessions" and "optionsfile"
are checked for some content.

Also the local declaration of "optionsfile" was incorrect.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This commit is contained in:
Martin Schiller
2026-02-05 08:57:02 +01:00
committed by Florian Eckert
parent 34d0684be1
commit ff2027ffa9
2 changed files with 6 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=rp-pppoe PKG_NAME:=rp-pppoe
PKG_VERSION:=4.0 PKG_VERSION:=4.0
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.uls.co.za/rp-pppoe/ PKG_SOURCE_URL:=https://downloads.uls.co.za/rp-pppoe/

View File

@@ -16,7 +16,9 @@ pppoe_triggers() {
pppoe_instance() { pppoe_instance() {
local cfg="$1" local cfg="$1"
local enabled interface device ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS local enabled interface device ac_name service_names service_name
local maxsessionsperpeer localip firstremoteip maxsessions optionsfile
local randomsession unit offset timeout mss sync OPTIONS
config_get_bool enabled "$cfg" enabled 1 config_get_bool enabled "$cfg" enabled 1
[ "$enabled" -gt 0 ] || return 0 [ "$enabled" -gt 0 ] || return 0
config_get interface "$cfg" interface config_get interface "$cfg" interface
@@ -48,8 +50,8 @@ pppoe_instance() {
[ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer" [ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer"
[ -n "$localip" ] && append OPTIONS "-L $localip" [ -n "$localip" ] && append OPTIONS "-L $localip"
[ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip" [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip"
[ -n "maxsessions" ] && append OPTIONS "-N $maxsessions" [ -n "$maxsessions" ] && append OPTIONS "-N $maxsessions"
[ -n "optionsfile" ] && append OPTIONS "-O $optionsfile" [ -n "$optionsfile" ] && append OPTIONS "-O $optionsfile"
[ "$randomsession" = "1" ] && append OPTIONS "-r" [ "$randomsession" = "1" ] && append OPTIONS "-r"
[ "$unit" = "1" ] && append OPTIONS "-u" [ "$unit" = "1" ] && append OPTIONS "-u"
[ -n "$offset" ] && append OPTIONS "-o $offset" [ -n "$offset" ] && append OPTIONS "-o $offset"