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