Rev Author Line No. Line
3278 kaklik 1 #!/bin/sh
2 ### BEGIN INIT INFO
3279 kaklik 3 # Provides: setup_lo
3281 kaklik 4 # Required-Start: $network $remote_fs $syslog
5 # Required-Stop: $network $remote_fs $syslog
3278 kaklik 6 # Default-Start: 2 3 4 5
7 # Default-Stop: 0 1 6
3279 kaklik 8 # Short-Description: Tune local oscilator
9 # Description: This start-up script tune local oscilator to defined frequency.
3278 kaklik 10 ### END INIT INFO
11  
3279 kaklik 12 # Author: Jakub Kakona <kaklik@mlab.cz>
3278 kaklik 13 #
14 # Please remove the "Author" lines above and replace them
15 # with your own name if you copy and modify this script.
16  
17 #cd ~/programy/usbsoftrock
18 #./usbsoftrock -s 10 calibrate
19 #./usbsoftrock -m 2 set freq 20.000
20  
21 PATH=/sbin:/bin
22  
23 . /lib/lsb/init-functions
24  
25 freq=142.997918
26  
27 case "$1" in
3281 kaklik 28 start)
3278 kaklik 29 "usbsoftrock -m 2 set freq $freq"
30 ;;
31 restart|reload|force-reload)
32 echo "Re-tunning the local oscilator" >&2
33 "usbsoftrock -m 2 set freq 20.000"
34 wait 1
35 "usbsoftrock -m 2 set freq $freq"
36 exit 3
37 ;;
3281 kaklik 38 stop)
3278 kaklik 39 # No-op
40 ;;
41 *)
42 echo "Error: argument '$1' not supported" >&2
43 echo "Usage: $0 start|stop" >&2
44 exit 3
45 ;;
46 esac
47  
48