Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2010
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. /etc/init.d/rc.local
  2. /etc/init.d# cat rc.local
  3. #! /bin/sh
  4. ### BEGIN INIT INFO
  5. # Provides: rc.local
  6. # Required-Start: $remote_fs $syslog $all
  7. # Required-Stop:
  8. # Default-Start: 2 3 4 5
  9. # Default-Stop:
  10. # Short-Description: Run /etc/rc.local if it exist
  11. ### END INIT INFO
  12.  
  13.  
  14. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  15.  
  16. . /lib/init/vars.sh
  17. . /lib/lsb/init-functions
  18.  
  19. do_start() {
  20. if [ -x /etc/rc.local ]; then
  21. [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
  22. /etc/rc.local
  23. ES=$?
  24. [ "$VERBOSE" != no ] && log_end_msg $ES
  25. return $ES
  26. fi
  27. }
  28.  
  29. case "$1" in
  30. start)
  31. do_start
  32. ;;
  33. restart|reload|force-reload)
  34. echo "Error: argument '$1' not supported" >&2
  35. exit 3
  36. ;;
  37. stop)
  38. ;;
  39. *)
  40. echo "Usage: $0 start|stop" >&2
  41. exit 3
  42. ;;
  43. esac
  44.  
  45.  
  46. /etc/rc.local
  47. #!/bin/sh -e
  48. #
  49. # rc.local
  50. #
  51. # This script is executed at the end of each multiuser runlevel.
  52. # Make sure that the script will "exit 0" on success or any other
  53. # value on error.
  54. #
  55. # In order to enable or disable this script just change the execution
  56. # bits.
  57. #
  58. # By default this script does nothing.
  59.  
  60. sh /etc/script.sh
  61. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement