summaryrefslogtreecommitdiffstats
path: root/package/busybox/files
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-08 21:31:29 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-08 21:31:29 +0000
commita6f470987e6035ee650e95b996ca96980f6d92bc (patch)
tree5bd6718695cc0d4d6cb10e61c4f664040c3e3ee5 /package/busybox/files
parent070f10ae835c1f0ec5eee513622afb07840d81c7 (diff)
add some more checks to the telnet init script
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6042 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/files')
-rwxr-xr-xpackage/busybox/files/telnet7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/busybox/files/telnet b/package/busybox/files/telnet
index c994c6052..c61fe73ad 100755
--- a/package/busybox/files/telnet
+++ b/package/busybox/files/telnet
@@ -2,7 +2,12 @@
# Copyright (C) 2006 OpenWrt.org
start() {
- if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null && [ -x /usr/sbin/dropbear ]; then telnetd -l /bin/login; fi
+ if [ \! -f /etc/passwd ] || \
+ awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/passwd 2>/dev/null || \
+ [ \! -x /usr/sbin/dropbear ]
+ then \
+ telnetd -l /bin/login
+ fi
}
stop() {