diff mbox

busybox: allow the user to set the telnetd options

Message ID 1478534712-2470-1-git-send-email-michael@walle.cc
State Accepted
Headers show

Commit Message

Michael Walle Nov. 7, 2016, 4:05 p.m. UTC
Source /etc/default/telnet to make it possible to override the telnetd
arguments. For example a user may want to set an alternative port.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 package/busybox/S50telnet | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Nov. 7, 2016, 10:04 p.m. UTC | #1
Hello,

On Mon,  7 Nov 2016 17:05:12 +0100, Michael Walle wrote:
> Source /etc/default/telnet to make it possible to override the telnetd
> arguments. For example a user may want to set an alternative port.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  package/busybox/S50telnet | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied to next, thanks.

Thomas
diff mbox

Patch

diff --git a/package/busybox/S50telnet b/package/busybox/S50telnet
index 47e2b63..82952b8 100755
--- a/package/busybox/S50telnet
+++ b/package/busybox/S50telnet
@@ -3,10 +3,13 @@ 
 # Start telnet....
 #
 
+TELNETD_ARGS=-F
+[ -r /etc/default/telnet ] && . /etc/default/telnet
+
 start() {
       printf "Starting telnetd: "
       start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
-			-x /usr/sbin/telnetd -- -F
+			-x /usr/sbin/telnetd -- $TELNETD_ARGS
       [ $? = 0 ] && echo "OK" || echo "FAIL"
 }