diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-01-08 21:31:29 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-01-08 21:31:29 +0000 |
commit | a6f470987e6035ee650e95b996ca96980f6d92bc (patch) | |
tree | 5bd6718695cc0d4d6cb10e61c4f664040c3e3ee5 /package/busybox/files/telnet | |
parent | 070f10ae835c1f0ec5eee513622afb07840d81c7 (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/telnet')
-rwxr-xr-x | package/busybox/files/telnet | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/busybox/files/telnet b/package/busybox/files/telnet index c994c6052f..c61fe73ad5 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() { |