/init.d/uptrack

http://github.com/brinkman83/bashrc · Shell · 40 lines · 23 code · 5 blank · 12 comment · 1 complexity · e2163ca5ab33ec8cbcdf4a8003261406 MD5 · raw file

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: uptrack
  4. # Required-Start: $local_fs
  5. # Required-Stop:
  6. # Default-Start: S
  7. # Default-Stop:
  8. # Short-Description: Applies Uptrack updates at boot-time.
  9. # Description: Applies Uptrack updates at boot-time.
  10. # X-Start-Before: $network
  11. ### END INIT INFO
  12. UPTRACK="/usr/sbin/uptrack-upgrade"
  13. UPTRACK_ARGS="--init"
  14. [ -x "$UPTRACK" ] || exit 0
  15. # Define LSB log_* functions.
  16. . /lib/lsb/init-functions
  17. case "$1" in
  18. start)
  19. log_begin_msg "Applying Ksplice Uptrack updates..."
  20. "$UPTRACK" $UPTRACK_ARGS
  21. log_end_msg $?
  22. ;;
  23. stop|restart|force-reload)
  24. echo "Error: There is no Uptrack daemon to $1:"
  25. echo " You never need to invoke the Uptrack init script manually."
  26. echo " This init script is only used to reinstall the Ksplice updates that were"
  27. echo " installed prior to the machine shutting down during the boot process."
  28. exit 1
  29. ;;
  30. *)
  31. echo "Usage: /etc/init.d/uptrack {start|stop|restart|force-reload}"
  32. exit 1
  33. ;;
  34. esac
  35. exit 0