K03rcd 535 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. if [ -e /tmp/dbgflag ]; then
  3. echo "debug enabled, rc.d disabled."
  4. exit 0
  5. fi
  6. for i in /opt/wz_mini/etc/rc.d/S??* ;do
  7. # Ignore dangling symlinks (if any).
  8. [ ! -f "$i" ] && continue
  9. case "$i" in
  10. *.sh)
  11. # Source shell script for speed.
  12. (
  13. trap - INT QUIT TSTP
  14. set start
  15. . $i
  16. )
  17. ;;
  18. *)
  19. # No sh extension, so fork subprocess.
  20. $i start
  21. ;;
  22. esac
  23. done