1
0

test.init 471 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. #PKG adk-test-tools
  3. #INIT 90
  4. . /etc/rc.conf
  5. case $1 in
  6. autostop) ;;
  7. autostart)
  8. test x"${test:-NO}" = x"NO" && exit 0
  9. exec sh $0 start
  10. ;;
  11. start)
  12. echo "Setting time via network ..."
  13. rdate -nv pool.ntp.org
  14. grep shell /proc/cmdline > /dev/null 2&>1
  15. if [ $? -eq 0 ];then
  16. exit 0
  17. fi
  18. echo "Starting test script ..."
  19. if [ -x /run.sh ];then
  20. /run.sh
  21. quit
  22. else
  23. echo "no run.sh found"
  24. quit
  25. fi
  26. ;;
  27. *)
  28. echo "Usage: $0 {start}"
  29. exit 1
  30. ;;
  31. esac
  32. exit $?