summaryrefslogtreecommitdiff
path: root/package/adk-test-tools/files/test.init
blob: 203a8c9735a7010419b50a0099f9f79f2f041631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
#PKG adk-test-tools
#INIT 90
. /etc/rc.conf

case $1 in
autostop) ;;
autostart)
	test x"${test:-NO}" = x"NO" && exit 0
	test x"$test" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
	exec sh $0 start
	;;
start)
	echo "Setting time via network ..."
	rdate -nv pool.ntp.org
	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 $?