From 6480acde4b08c46dd9d270a46005fe6f24e9a0b2 Mon Sep 17 00:00:00 2001 From: Alexey Dobrovolsky Date: Fri, 4 Sep 2020 15:22:12 +0300 Subject: [PATCH 1/2] freeradius3: enable radtest utility radtest utility is used in many manuals to check the operation of radius server. At the moment all parameters must be specified at startup, for example: $ radtest bob hello localhost 0 testing123 0 localhost Signed-off-by: Alexey Dobrovolsky --- net/freeradius3/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile index e3a2a152e..992a7689f 100644 --- a/net/freeradius3/Makefile +++ b/net/freeradius3/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=freeradius3 PKG_VERSION:=release_3_0_21 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive @@ -732,7 +732,7 @@ endef define Package/freeradius3-utils/install $(INSTALL_DIR) $(1)/usr/bin - for f in radclient radeapclient radwho; do \ + for f in radclient radeapclient radtest radwho; do \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \ done endef From 8b2792adc904045ca58ad077496f19ef634dc960 Mon Sep 17 00:00:00 2001 From: Alexey Dobrovolsky Date: Sat, 5 Sep 2020 01:31:28 +0300 Subject: [PATCH 2/2] freeradius3: fix hostname invocation in radtest Canonical radtest start results in an error: $ radtest bob hello localhost 0 testing123 /usr/bin/radtest: line 1: hostname: not found (0) Error parsing "stdin": Failed to get value hostname command is not present in OpenWrt. Instead, hostname can be obtained from file /proc/sys/kernel/hostname. added: 004-get-hostname-from-proc-in-radtest.patch Signed-off-by: Alexey Dobrovolsky --- net/freeradius3/Makefile | 2 +- .../004-get-hostname-from-proc-in-radtest.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 net/freeradius3/patches/004-get-hostname-from-proc-in-radtest.patch diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile index 992a7689f..1366e5c10 100644 --- a/net/freeradius3/Makefile +++ b/net/freeradius3/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=freeradius3 PKG_VERSION:=release_3_0_21 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive diff --git a/net/freeradius3/patches/004-get-hostname-from-proc-in-radtest.patch b/net/freeradius3/patches/004-get-hostname-from-proc-in-radtest.patch new file mode 100644 index 000000000..c3f368e24 --- /dev/null +++ b/net/freeradius3/patches/004-get-hostname-from-proc-in-radtest.patch @@ -0,0 +1,12 @@ +--- a/src/main/radtest.in ++++ b/src/main/radtest.in +@@ -112,7 +112,7 @@ if [ "$7" ] + then + nas=$7 + else +- nas=`hostname` ++ nas=$(cat /proc/sys/kernel/hostname) + fi + + ( +