xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] Cwdaemon


From: John
Subject: [Xlog-discussion] Cwdaemon
Date: Mon, 23 Sep 2013 15:40:44 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

Still trying... on fresh cold boots the last two mornings, "ps -A" shows no cwdaemon running. (Everybody probably knows this, but I had to try it anyway: starting Xlog does not start cwdaemon.) I started cwdaemon  with "sudo /usr/sbin ./cwdaemon". Another "ps -A" then shows it running. Xlog's keyer continues not to function.

Below is my /etc/init.d/cwdaemon. Doesn't this specify what's set to run at boot? It appears to run /etc/default/cwdaemon (although no changes I've made there, like SPEED, seem to have any effect) and to start /usr/sbin/cwdaemon. My parport0 is recognized and lp is not loaded. As previously reported, /usr/share/cwdaemon/cwtest produces audible output only at the "switch to soundcard" point.

Anyone see anything wrong here? Can anyone confirm that it's like theirs?

#! /bin/sh
### BEGIN INIT INFO
# Provides:          cwdaemon
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: A Morse daemon.
### END INIT INFO
#
# Author of this script: Ladislav Vaiz <address@hidden>
#
# Version:  @(#)cwdaemon  1.0  03-Jul-2004  address@hidden
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/cwdaemon
NAME=cwdaemon
DESC="Morse daemon"

PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
OPTS=""

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Exit if it says no start
grep -q '^START_CWDAEMON=yes' /etc/default/$NAME || exit 0

# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
    . /etc/default/$NAME

    test -n "$DEVICE"   && OPTS="$OPTS -d $DEVICE"
    test -n "$UDPPORT"  && OPTS="$OPTS -p $UDPPORT"
    test -n "$PRIORITY" && OPTS="$OPTS -P $PRIORITY"
    test -n "$SPEED"    && OPTS="$OPTS -s $SPEED"
    test -n "$PTTDELAY" && OPTS="$OPTS -t $PTTDELAY"
    test -n "$VOLUME"   && OPTS="$OPTS -v $VOLUME"
    test -n "$WEIGHT"   && OPTS="$OPTS -w $WEIGHT"
    test -n "$SDEVICE"  && OPTS="$OPTS -x $SDEVICE"
fi

case "$1" in
  start)
    echo "$DEVICE" | grep -q 'parport'
    if [ $? = 0 ]; then
        lsmod|grep -q '\<lp\>'
        if [ $? = 0 ]; then
            echo "Removing module lp"
            rmmod lp
        fi
    fi

    echo -n "Starting $DESC: $NAME"
    start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS
    echo "."
    ;;
  stop)
    echo -n "Stopping $DESC: $NAME"
    start-stop-daemon --stop --quiet --exec $DAEMON
    echo "."
    ;;
  restart|force-reload)
    echo -n "Restarting $DESC: $NAME"
    start-stop-daemon --stop --quiet --exec $DAEMON
    sleep 1
    start-stop-daemon --start --quiet --exec $DAEMON -- $OPTS
    echo "."
    ;;
  status)
    /bin/ps xa|grep "$DAEMON" | grep -v "grep"
    ;;
  *)
    echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
    exit 1
    ;;
esac

exit 0

-- John K3GHH

reply via email to

[Prev in Thread] Current Thread [Next in Thread]