diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-12-10 20:50:03 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-12-10 20:50:03 +0000 |
commit | 26fde007f13f5114efedad8d411d397bb06c93e8 (patch) | |
tree | 200171b35bf8b10b995cbd695991a903b71f1c48 /usr | |
parent | f4959a6958cf9ca47d7f1af90b70f64282643272 (diff) | |
download | pfsense-26fde007f13f5114efedad8d411d397bb06c93e8.zip pfsense-26fde007f13f5114efedad8d411d397bb06c93e8.tar.gz |
Wrap beep script in a check for /dev/speaker
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/bin/beep.sh | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh index 9001abf..9efdd25 100755 --- a/usr/local/bin/beep.sh +++ b/usr/local/bin/beep.sh @@ -1,17 +1,20 @@ #!/bin/sh -if [ "$1" = "start" ]; then - /usr/local/bin/beep -p 500 200 - /usr/local/bin/beep -p 400 200 - /usr/local/bin/beep -p 600 200 - /usr/local/bin/beep -p 800 200 - /usr/local/bin/beep -p 800 200 -fi -if [ "$1" = "stop" ]; then - /usr/local/bin/beep -p 600 200 - /usr/local/bin/beep -p 800 200 - /usr/local/bin/beep -p 500 200 - /usr/local/bin/beep -p 400 200 - /usr/local/bin/beep -p 400 200 -fi +if [ -f "/dev/speaker" ]; then + + if [ "$1" = "start" ]; then + /usr/local/bin/beep -p 500 200 + /usr/local/bin/beep -p 400 200 + /usr/local/bin/beep -p 600 200 + /usr/local/bin/beep -p 800 200 + /usr/local/bin/beep -p 800 200 + fi + if [ "$1" = "stop" ]; then + /usr/local/bin/beep -p 600 200 + /usr/local/bin/beep -p 800 200 + /usr/local/bin/beep -p 500 200 + /usr/local/bin/beep -p 400 200 + /usr/local/bin/beep -p 400 200 + fi +fi
\ No newline at end of file |