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: 005-get-hostname-from-proc-in-radtest.patch
(backported from commit 8b2792a
)
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
This commit is contained in:
parent
066ac03921
commit
2d410422c5
2 changed files with 13 additions and 1 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=freeradius3
|
PKG_NAME:=freeradius3
|
||||||
PKG_VERSION:=release_3_0_21
|
PKG_VERSION:=release_3_0_21
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
|
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
(
|
||||||
|
|
Loading…
Reference in a new issue