2006-10-04 20:05:48 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2006-06-27 00:36:13 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2007-05-10 10:38:53 +00:00
|
|
|
START=50
|
2006-06-27 00:36:13 +00:00
|
|
|
|
2006-10-04 20:05:48 +00:00
|
|
|
start() {
|
2007-01-08 21:31:29 +00:00
|
|
|
if [ \! -f /etc/passwd ] || \
|
2010-07-18 15:18:38 +00:00
|
|
|
( awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/passwd 2>/dev/null && \
|
|
|
|
awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/shadow 2>/dev/null ) || \
|
2008-08-09 09:50:12 +00:00
|
|
|
( [ \! -x /usr/sbin/dropbear ] && [ \! -x /usr/sbin/sshd ] )
|
2007-01-08 21:31:29 +00:00
|
|
|
then \
|
2009-04-04 09:35:55 +00:00
|
|
|
telnetd -l /bin/login.sh
|
2007-01-08 21:31:29 +00:00
|
|
|
fi
|
2006-10-04 20:05:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
killall telnetd
|
|
|
|
}
|