diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-16 18:55:56 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-16 18:56:38 +0200 |
commit | 0719335f0733e0b26f75e8ba797ac80d25fdf605 (patch) | |
tree | d77cb5d4f010b4133da5e43b6a7b6af2a80f32a5 /package | |
parent | 9e788b5d79e824c264563705b80934a51441e8e0 (diff) |
update test init script
Diffstat (limited to 'package')
-rw-r--r-- | package/adk-test-tools/Makefile | 2 | ||||
-rwxr-xr-x | package/adk-test-tools/files/test.init | 45 | ||||
-rw-r--r-- | package/rdate/files/rdate.postinst | 1 |
3 files changed, 32 insertions, 16 deletions
diff --git a/package/adk-test-tools/Makefile b/package/adk-test-tools/Makefile index 80be5a41b..efc8713ec 100644 --- a/package/adk-test-tools/Makefile +++ b/package/adk-test-tools/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= adk-test-tools PKG_VERSION:= 0.1 -PKG_RELEASE:= 6 +PKG_RELEASE:= 7 PKG_DESCR:= helper tools and scripts for adk-test-framework PKG_SECTION:= misc PKG_URL:= http://openadk.org/ diff --git a/package/adk-test-tools/files/test.init b/package/adk-test-tools/files/test.init index 773986dca..9812c86df 100755 --- a/package/adk-test-tools/files/test.init +++ b/package/adk-test-tools/files/test.init @@ -1,18 +1,33 @@ #!/bin/sh #PKG adk-test-tools #INIT 90 -[[ $1 = autostart ]] || exit 0 -echo "Setting time via network ..." -rdate -nv pool.ntp.org -echo "Starting test script ..." -grep shell /proc/cmdline > /dev/null 2&>1 -if [ $? -eq 0 ];then - exit 0 -fi -if [ -x /run.sh ];then - /run.sh - quit -else - echo "no run.sh found" - quit -fi +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${test:-NO}" = x"NO" && exit 0 + 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 $? diff --git a/package/rdate/files/rdate.postinst b/package/rdate/files/rdate.postinst index e0013bdcc..993e74702 100644 --- a/package/rdate/files/rdate.postinst +++ b/package/rdate/files/rdate.postinst @@ -1,4 +1,5 @@ #!/usr/bin/env bash . $IPKG_INSTROOT/etc/functions.sh add_rcconf 'e.g. "-nv pool.ntp.org"' rdate_flags +add_service ntp 123/tcp add_service ntp 123/udp |