diff options
author | Graeme Gregory <dp@xora.org.uk> | 2008-03-25 07:34:23 +0000 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2008-03-25 07:34:23 +0000 |
commit | 80e765ba6f2c395006d82251bea0b3590b277dff (patch) | |
tree | a1af31784e3970f80650ca0af796ab7386362423 /packages/busybox/files/50telnet | |
parent | 30670f2daf9a086b47cee18af56265bf8fedaf29 (diff) | |
parent | bc02b41d392b6fce7a50e992de6b5b2234bab183 (diff) |
merge of '55b6b2c132d8b0a81bcec0deed383a3da45e39e8'
and '67254ac9ecc3abdbf0b718b05d6eaa8d6b4b6e92'
Diffstat (limited to 'packages/busybox/files/50telnet')
-rw-r--r-- | packages/busybox/files/50telnet | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/busybox/files/50telnet b/packages/busybox/files/50telnet new file mode 100644 index 0000000000..3fb4a90494 --- /dev/null +++ b/packages/busybox/files/50telnet @@ -0,0 +1,16 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2008 Koen Kooi + +# This starts telnetd if the password for 'root' is empty. This is needed for devices without a screen or serial console (wifi router, NAS, etc). + +start() { + if awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/passwd 2>/dev/null + then + telnetd -l /bin/login.failsafe + fi +} + +stop() { + killall telnetd +} |