diff options
-rwxr-xr-x | usr/local/bin/beep.sh | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh index 916d11a..f9f8eeb 100755 --- a/usr/local/bin/beep.sh +++ b/usr/local/bin/beep.sh @@ -1,20 +1,32 @@ #!/bin/sh -if [ -c "/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 +# Standard note length +NOTELENGTH="200" -fi
\ No newline at end of file +# Embedded uses 100HZ +if [ $PFSENSETYPE = "embedded" ]; then + NOTELENGTH="50" +fi + +# Check for different HZ +HZ=`cat /boot/loader.conf | grep kern.hz | wc` +if [ "$HZ" -gt 0 ]; then + NOTELENGTH="50" +fi + +if [ -c "/dev/speaker" ]; then + if [ "$1" = "start" ]; then + /usr/local/bin/beep -p 500 $NOTELENGTH + /usr/local/bin/beep -p 400 $NOTELENGTH + /usr/local/bin/beep -p 600 $NOTELENGTH + /usr/local/bin/beep -p 800 $NOTELENGTH + /usr/local/bin/beep -p 800 $NOTELENGTH + fi + if [ "$1" = "stop" ]; then + /usr/local/bin/beep -p 600 $NOTELENGTH + /usr/local/bin/beep -p 800 $NOTELENGTH + /usr/local/bin/beep -p 500 $NOTELENGTH + /usr/local/bin/beep -p 400 $NOTELENGTH + /usr/local/bin/beep -p 400 $NOTELENGTH + fi +fi
\ No newline at end of file |