diff options
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/bin/beep.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh index febb222..6f4e477 100755 --- a/usr/local/bin/beep.sh +++ b/usr/local/bin/beep.sh @@ -9,9 +9,11 @@ if [ "$PFSENSETYPE" = "embedded" ]; then fi # this is super annoying in VMware, exit if in VMware -VMWCOUNT=`/usr/bin/grep -c VMware /var/log/dmesg.boot` -if [ $VMWCOUNT -gt 0 ]; then - exit; +if [ -f /var/log/dmesg.boot ]; then + VMWCOUNT=`/usr/bin/grep -c VMware /var/log/dmesg.boot` + if [ $VMWCOUNT -gt 0 ]; then + exit; + fi fi # Check for different HZ @@ -37,4 +39,4 @@ if [ -c "/dev/speaker" ]; then /usr/local/bin/beep -p 400 $NOTELENGTH /usr/local/bin/beep -p 400 $NOTELENGTH fi -fi
\ No newline at end of file +fi |