Project

General

Profile

Download (1021 Bytes) Statistics
| Branch: | Tag: | Revision:
1 fa94531e Scott Ullrich
#!/bin/sh
2
3 4b0e8c91 Warren Baker
4 a5c36eb2 Renato Botelho
BEEP=$(/usr/local/sbin/read_xml_tag.sh boolean system/disablebeep)
5
if [ "$BEEP" = "true" ]; then
6 5e4d70a0 Yehuda Katz
	exit;
7
fi
8
9 e8834794 Scott Ullrich
# Standard note length
10 15fb3343 Scott Ullrich
NOTELENGTH="25"
11 fa94531e Scott Ullrich
12 6f895eca Chris Buechler
# this is super annoying in VMware, exit if in VMware
13 7734aea6 Andrew Thompson
if [ -f /var/log/dmesg.boot ]; then
14
	VMWCOUNT=`/usr/bin/grep -c VMware /var/log/dmesg.boot`
15
	if [ $VMWCOUNT -gt 0 ]; then
16
		exit;
17
	fi
18 6f895eca Chris Buechler
fi
19
20 7d61beba Phil Davis
# Check for different HZ
21 f5af0501 Scott Ullrich
if [ -f /boot/loader.conf ]; then
22 16926fdc jim-p
	HZ=`/usr/bin/grep -c kern.hz /boot/loader.conf`
23 f0504457 Scott Ullrich
	if [ "$HZ" = "1" ]; then
24
		NOTELENGTH="10"
25
	fi
26 e8834794 Scott Ullrich
fi
27
28 7d61beba Phil Davis
if [ -c "/dev/speaker" ]; then
29
	if [ "$1" = "start" ]; then
30
		/usr/local/bin/beep -p 500 $NOTELENGTH
31
		/usr/local/bin/beep -p 400 $NOTELENGTH
32
		/usr/local/bin/beep -p 600 $NOTELENGTH
33
		/usr/local/bin/beep -p 800 $NOTELENGTH
34
		/usr/local/bin/beep -p 800 $NOTELENGTH
35
	fi
36
	if [ "$1" = "stop" ]; then
37
		/usr/local/bin/beep -p 600 $NOTELENGTH
38
		/usr/local/bin/beep -p 800 $NOTELENGTH
39
		/usr/local/bin/beep -p 500 $NOTELENGTH
40
		/usr/local/bin/beep -p 400 $NOTELENGTH
41
		/usr/local/bin/beep -p 400 $NOTELENGTH
42
	fi
43 7734aea6 Andrew Thompson
fi