summaryrefslogtreecommitdiff
path: root/package/adktest/files/adktest.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/adktest/files/adktest.init')
-rwxr-xr-xpackage/adktest/files/adktest.init32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/adktest/files/adktest.init b/package/adktest/files/adktest.init
new file mode 100755
index 000000000..ac1a047aa
--- /dev/null
+++ b/package/adktest/files/adktest.init
@@ -0,0 +1,32 @@
+#!/bin/sh
+#PKG adktest
+#INIT 90
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${adktest:-NO}" = x"NO" && exit 0
+ test x"$adktest" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+ exec sh $0 start
+ ;;
+start)
+ grep shell /proc/cmdline > /dev/null 2&>1
+ if [ $? -eq 0 ];then
+ exit 0
+ fi
+ echo "Starting test script ..."
+ if [ -x /run.sh ];then
+ /run.sh
+ quit
+ else
+ echo "no run.sh found"
+ quit
+ fi
+ ;;
+*)
+ echo "Usage: $0 {start}"
+ exit 1
+ ;;
+esac
+exit $?