summaryrefslogtreecommitdiffstats
path: root/package/base-files/default/etc/init.d/S50telnet
blob: 228eac2b62939062b79ceb12713f4c1c484bf393 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org

start() {
	if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi
}

stop() {
	killall telnetd
}