amixer.init 513 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. #PKG alsa-utils
  3. #INIT 60
  4. . /etc/rc.conf
  5. case $1 in
  6. autostop) ;;
  7. autostart)
  8. test x"${amixer:-NO}" = x"NO" && exit 0
  9. test x"$amixer" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
  10. exec sh $0 start
  11. ;;
  12. start)
  13. for mixer in $amixer_mixer; do
  14. amixer set $mixer on
  15. amixer set $mixer $amixer_volume
  16. done
  17. ;;
  18. stop)
  19. for mixer in $amixer_mixer; do
  20. amixer set $mixer off
  21. done
  22. ;;
  23. restart)
  24. sh $0 stop
  25. sh $0 start
  26. ;;
  27. *)
  28. echo "Usage: $0 {start | stop | restart}"
  29. exit 1
  30. ;;
  31. esac
  32. exit $?