~ubuntu-branches/ubuntu/gutsy/cwdaemon/gutsy

« back to all changes in this revision

Viewing changes to cwsetup.sh

  • Committer: Bazaar Package Importer
  • Author(s): Joop Stakenborg
  • Date: 2004-04-26 21:27:29 UTC
  • Revision ID: james.westby@ubuntu.com-20040426212729-3wwptnx2a1l9kein
Tags: 0.8
* Cwdaemon is now integrated with unixcw, see cwlib.c and cwlib.h.
  Weighting has been added to unixcw and some special characters needed
  by cwdaemon. The choppiness reported in previous versions of cwdaemon is
  fixed. And we have soundcard support!
* Better handling of aborting messages.
* Weighting now uses a value of -50 to 50.
* 2 extra command line options: -v for volume and -x for sound device.
* 2 extra escape sequences for controlling cwdaemon: ESCfx for switching the
  sound output on the fly and ESCgx for setting the soundcard volume.
* Tune (ESCc) now uses seconds as an argument, e.g. ESCc1 tunes 1 second,
  ESCc10 tunes 10 seconds. Maximum tune value is 10 seconds.
* A fix by Lada, OK1ZIA for big endian systems.
* Footswitch support by Wolf, DL2WRJ (pin 15 of the parallel port).
* New morse character '@' has been added.
* Process priority of cwdaemon can be set with the -P flag. You can try this
  if you experience timing problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
PATH="/bin:/sbin:/usr/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:."
 
4
 
 
5
# check if we are root
 
6
if [ "$EUID" != "0" ]; then
 
7
        echo "You must run this script as root..."
 
8
        exit 1
 
9
fi
 
10
 
 
11
job=0
 
12
 
 
13
echo "Checking what needs to be done"
 
14
 
 
15
# check for parport devices
 
16
if [ ! -c /dev/parport0 ]; then
 
17
        echo "Creating parport devices"
 
18
        DIR=`pwd`
 
19
        cd /dev
 
20
        MAKEDEV parport
 
21
        cd $DIR
 
22
        job=1
 
23
fi
 
24
 
 
25
# check for kernel modules
 
26
if ! lsmod|grep parport > /dev/null; then
 
27
        echo "Loading parport modules"
 
28
        modprobe parport_pc
 
29
        modprobe parport
 
30
        job=1
 
31
fi
 
32
 
 
33
if lsmod|grep lp|grep " 0 " > /dev/null; then
 
34
        echo "Unloading lp module"
 
35
        rmmod lp
 
36
        job=1
 
37
fi
 
38
 
 
39
if ! lsmod|grep ppdev > /dev/null; then
 
40
        echo "Loading ppdev module"
 
41
        modprobe ppdev
 
42
        job=1
 
43
fi
 
44
 
 
45
if [ $job -eq 1 ]; then
 
46
        echo "Setup is ready"
 
47
else
 
48
        echo "Nothing to do, your setup is okay"
 
49
fi
 
50
 
 
51
echo "Please run \"cwdaemon -n\" (as root) for diagnosis"