[Lcdproc] LCDd not loading properly

brian turbo@talstar.com
Tue Apr 24 15:05:02 2007


This is a multi-part message in MIME format.
--------------030605030903050207070008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Stewart W. Putnam wrote:
> 
> This certainly looks like a show stopper.  If it doesn't start properly 
> what good is it?

   Well, it's still "good" ... just not very "convenient" to start up... ;)

> I think that some sort of failure in the Foreground=no option is most 
> likely.
> 
> Before wondering about anything more complex or mysterious, set 
> ReportLevel=5 in LCDd.conf and check a few things.  Run LCDd breifly, 
> long enough to display a few lines, then stop it.
> 
> Look in syslog for a line like:
> date:time localhost LCDd: Using Configuration File: /etc/LCDd.conf

    Apr 24 10:30:43 myth LCDd: LCDd version CVS-current-20070317 starting
    Apr 24 10:30:43 myth LCDd: Built on Mar 27 2007, protocol version 0.3, API version 0.5
    Apr 24 10:30:43 myth LCDd: Using Configuration File: /usr/local/etc/LCDd.conf
    Apr 24 10:30:43 myth LCDd: Set report level to 5, output to syslog
    Apr 24 10:30:43 myth LCDd: Server forking to background
    Apr 24 10:30:43 myth LCDd: Listening for queries on 127.0.0.1:13666
    Apr 24 10:30:43 myth LCDd: CFontz: using Device /dev/ttyUSB0
    Apr 24 10:30:44 myth LCDd: Key "Menu" is now reserved in exclusive mode by client [-1]
    Apr 24 10:30:44 myth LCDd: Key "Enter" is now reserved in shared mode by client [-1]
    Apr 24 10:30:44 myth LCDd: Key "Up" is now reserved in shared mode by client [-1]
    Apr 24 10:30:44 myth LCDd: Key "Down" is now reserved in shared mode by client [-1]
    Apr 24 10:30:44 myth LCDd: screenlist_switch: switched to screen [_server_screen]

  This all looks "normal", no?  It's reading the correct config file (and the only LCDd.conf file that exists on the machine), it 
says it is forking to background, and it loads the specified driver, which connects to the proper device.  I still had to hit 
"Ctrl-C" to get back to the shell prompt, and never got the "[OK]" that the service had started up (usually shown by FC/RH as 
services are started/stopped/etc).  "ps ax | grep LCDd" indicated that the service had, indeed, started up and was running.

  LCDd was started by typing "service LCDd start" at the shell prompt (which is how FC/RH manage 'services').  Identical 
output/actions occur if I were to type "/usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf" at the shell prompt.

  Everything is operating normally (except for having to hit Ctrl-C during startup), and LCDd is waiting for client(s) to connect, 
etc...

  After a few seconds, I typed "pkill LCDd" and hit <Enter> at the shell prompt:

    Apr 24 10:30:53 myth LCDd: Server shutting down on SIGTERM
    Apr 24 10:30:53 myth LCDd: Key "Menu" was reserved in exclusive mode by client [-1] and is now released
    Apr 24 10:30:53 myth LCDd: Key "Enter" was reserved in shared mode by client [-1] and is now released
    Apr 24 10:30:53 myth LCDd: Key "Up" was reserved in shared mode by client [-1] and is now released
    Apr 24 10:30:53 myth LCDd: Key "Down" was reserved in shared mode by client [-1] and is now released
    Apr 24 10:30:53 myth LCDd: Exiting.

  ...and everything exits and shuts down normally.

> If you have reports is syslog that the intended LCDd.conf is being used 
> and Server forking to background, then the only other possibility that 
> comes to mind is some init scripting error.

   I would tend to agree... except that the same behavior exists if I were to start the LCDd service manually, rather than using the 
init script (and, in fact, I've done exactly that, assuming an error in the init script, previously).  In any case, I've attached 
the /etc/rc.d/init.d/LCDd script from my system for your perusal.


   Please let me know if there's some further debugging, etc I can do at this end to help troubleshoot the problem.



--------------030605030903050207070008
Content-Type: text/plain;
 name="LCDd.init"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="LCDd.init"

#!/bin/sh
# This is the LCDd init-script for RPM based (RedHat, Mandrake) systems
#
# Copyright (C) 2001  Rene Wagner <reenoo@gmx.de>
#               2001  Guillaume Filion <gfk@logidac.com>
#
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
#
#
# chkconfig: 345 70 21
# description: LCDd(8) is the LCDproc server used for displaying text and 
#              other data to LCDs.
# Apart from the main client lcdproc(1) there are various clients.
# See http://lcdproc.omnipotent.net for details.
# processname: LCDd
# pidfile: /var/run/LCDd.pid
# config: ${prefix}/etc/LCDd.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]; then
        exit 0
fi

RETVAL=0

prefix=/usr/local
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
etc=${prefix}/etc

LCDd=${sbindir}/LCDd
configfile=${etc}/LCDd.conf

[ -x ${LCDd} ] || exit 0

start() {
	echo -n "Starting up LCDd: "
        daemon ${LCDd} -c ${configfile}

	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/LCDd
	echo
}

stop() {
	echo -n "Shutting down LCDd: "
	killproc LCDd
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/LCDd
	echo
}

dostatus() {
	status LCDd
	RETVAL=$?
}

restart() {
	stop
	start
	RETVAL=$?
}

condrestart() {
	[ -e /var/lock/subsys/LCDd ] && restart || :
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	dostatus
	;;
  restart)
	restart
	;;
  condrestart)
	condrestart
	;;
  *)
	echo "Usage: $0 {start|stop|status|restart|condrestart}"
	exit 1
esac

exit $RETVAL

--------------030605030903050207070008--