/rc4.d/S99rc.local

http://github.com/brinkman83/bashrc · Shell · 41 lines · 27 code · 5 blank · 9 comment · 5 complexity · 2964c1446c6453cdde4213eede97ac38 MD5 · raw file

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: rc.local
  4. # Required-Start: $remote_fs $syslog $all
  5. # Required-Stop:
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: Run /etc/rc.local if it exist
  9. ### END INIT INFO
  10. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  11. . /lib/init/vars.sh
  12. . /lib/lsb/init-functions
  13. do_start() {
  14. if [ -x /etc/rc.local ]; then
  15. [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
  16. /etc/rc.local
  17. ES=$?
  18. [ "$VERBOSE" != no ] && log_end_msg $ES
  19. return $ES
  20. fi
  21. }
  22. case "$1" in
  23. start)
  24. do_start
  25. ;;
  26. restart|reload|force-reload)
  27. echo "Error: argument '$1' not supported" >&2
  28. exit 3
  29. ;;
  30. stop)
  31. ;;
  32. *)
  33. echo "Usage: $0 start|stop" >&2
  34. exit 3
  35. ;;
  36. esac