document the change in prompt timeout handling
[vlock.git] / scripts / alsa_mute.sh
blob57e951f8bd3dfbd07be8306ec7691330a823aaf8
1 #!/bin/sh
2 # alsa_mute.sh -- alsa muting script for vlock,
3 # the VT locking program for linux
4 #
5 # This program is copyright (C) 2007 Frank Benkstein, and is free software. It
6 # comes without any warranty, to the extent permitted by applicable law. You
7 # can redistribute it and/or modify it under the terms of the Do What The Fuck
8 # You Want To Public License, Version 2, as published by Sam Hocevar. See
9 # http://sam.zoy.org/wtfpl/COPYING for more details.
11 set -e
13 DEPENDS="all"
15 hooks() {
16 while read hook_name ; do
17 case "${hook_name}" in
18 vlock_start)
19 amixer -q set Master mute
21 vlock_end)
22 amixer -q set Master unmute
24 esac
25 done
28 if [ $# -ne 1 ] ; then
29 echo >&2 "Usage: $0 <command>"
30 exit 1
33 case "$1" in
34 hooks)
35 hooks
37 preceeds)
38 echo "${PRECEEDS}"
40 succeeds)
41 echo "${SUCCEEDS}"
43 requires)
44 echo "${REQUIRES}"
46 needs)
47 echo "${NEEDS}"
49 depends)
50 echo "${DEPENDS}"
52 conflicts)
53 echo "${CONFLICTS}"
56 echo >&2 "$0: unknown command '$1'"
57 exit 1
59 esac