summaryrefslogtreecommitdiff
path: root/package/base-files/default/etc/init.d/telnet
blob: c994c6052fa983929ee344a2ac831c5fd6f07718 (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 && [ -x /usr/sbin/dropbear ]; then telnetd -l /bin/login; fi
}

stop() {
	killall telnetd
}