[package] base-files & telnet: Fixed telnet starting even with root password when...
[openwrt.git] / package / busybox / files / telnet
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3 START=50
4
5 start() {
6 if [ \! -f /etc/passwd ] || \
7 ( awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/passwd 2>/dev/null && \
8 awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/shadow 2>/dev/null ) || \
9 ( [ \! -x /usr/sbin/dropbear ] && [ \! -x /usr/sbin/sshd ] )
10 then \
11 telnetd -l /bin/login.sh
12 fi
13 }
14
15 stop() {
16 killall telnetd
17 }
This page took 0.045518 seconds and 5 git commands to generate.