summaryrefslogtreecommitdiff
path: root/package/adktest/files/adktest.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2014-07-08 17:27:32 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2014-07-08 17:27:32 +0200
commite12f9f2abbe7054f005c8c28b2eb416c6b0eb086 (patch)
tree0da9a26f7b0fa44a210fe8f023102bb39959894b /package/adktest/files/adktest.init
parent3c98ceaa57fe2f1979e6a60e583ad0fe000eef4f (diff)
fix update-rcconf, rename adk-test package
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 $?