alsa 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin alsa
  4. #
  5. # Description : Restore and store ALSA settings
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : BLFS SVN
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: alsa
  14. # Required-Start:
  15. # Should-Start:
  16. # Required-Stop: sendsignals
  17. # Should-Stop:
  18. # Default-Start: S
  19. # Default-Stop: 0 1 6
  20. # Short-Description: Restore and store ALSA mixer settings.
  21. # Description: Restores and stores ALSA mixer settings in the default
  22. # location: /var/lib/alsa/asound.state.
  23. # X-LFS-Provided-By: BLFS
  24. ### END INIT INFO
  25. . /lib/lsb/init-functions
  26. #$LastChangedBy: igor $
  27. #$Date: 2013-07-25 04:50:36 -0500 (Thu, 25 Jul 2013) $
  28. case "$1" in
  29. start)
  30. log_info_msg "Starting ALSA... Restoring volumes..."
  31. /usr/sbin/alsactl restore
  32. evaluate_retval
  33. ;;
  34. stop)
  35. log_info_msg "Stopping ALSA... Saving volumes..."
  36. /usr/sbin/alsactl store
  37. evaluate_retval
  38. ;;
  39. *)
  40. echo "Usage: $0 {start|stop}"
  41. exit 1
  42. ;;
  43. esac
  44. # End alsa