]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/system/beep
ipsec-interfaces: Apply static routes (again) after creating IPsec interfaces
[people/pmueller/ipfire-2.x.git] / src / initscripts / system / beep
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/beep
4 #
5 # Description : Plays a short melody when system goes up or down
6 #
7 # Authors : Michael Tremer - mitch@ipfire.org
8 #
9 # Version : 01.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 LENGTH=40
19
20 play () {
21
22 beep -l $LENGTH -f $1 2> /dev/null
23
24 }
25
26 case "${1}" in
27 start)
28 for i in 440 466 494 523 554 587 622 659 698 740 764 831 880; do
29 play $i
30 done
31
32 ;;
33
34 stop)
35 for i in 880 831 764 740 698 659 622 587 554 532 494 466 440; do
36 play $i
37 done
38 ;;
39
40 up)
41 for i in 440 622 880; do
42 play $i
43 done
44 ;;
45
46 down)
47 for i in 880 622 440; do
48 play $i
49 done
50 ;;
51
52 *)
53 echo "Usage: ${0} {start|stop|up|down}"
54 exit 1
55 ;;
56 esac
57
58 # End $rc_base/init.d/beep