add new rc.common for standardized init scripts, convert existing init scripts
[openwrt.git] / package / base-files / default / etc / init.d / S50telnet
index 25242bdef87a568dcbbaa031c8aed0828889442e..228eac2b62939062b79ceb12713f4c1c484bf393 100755 (executable)
@@ -1,4 +1,10 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
 # Copyright (C) 2006 OpenWrt.org
 
-if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi
+start() {
+       if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi
+}
+
+stop() {
+       killall telnetd
+}