diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-01-08 21:31:29 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-01-08 21:31:29 +0000 |
commit | 403290693826436e69959af15aae9ad1a2ca1dc4 (patch) | |
tree | 5bd6718695cc0d4d6cb10e61c4f664040c3e3ee5 /package/busybox/files | |
parent | 8ee3cc2b4cf82cec1ada59cd25bcca622fd944c1 (diff) | |
download | master-187ad058-403290693826436e69959af15aae9ad1a2ca1dc4.tar.gz master-187ad058-403290693826436e69959af15aae9ad1a2ca1dc4.tar.bz2 master-187ad058-403290693826436e69959af15aae9ad1a2ca1dc4.zip |
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-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() { |