[mythtv-users] I just posted directions to get the VFD on the D.Vine 5 working...

Zach Garner zach.garner at fusemail.com
Thu Mar 23 06:26:57 UTC 2006


I'm pretty sure I got some of it off the list here and would credit but I
wasn't tracking it. I did however write a *working* RHEL(4) init script
for LCDd if anyone can use it. I've put everything into the wiki already.
I'll send the lcdproc guy(s) a copy of this too. RHEL based distro's are
still pretty popular, even if I see a lot more written for Debian. :)

Isaac, you rock.

#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the LCDd daemon \
#              used to provide LCDd display services.
#
# config:  /etc/LCDd.conf


# Source function library.
if [ -f /etc/init.d/functions ] ; then
  . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
  . /etc/rc.d/init.d/functions
else
  exit 0
fi

# Avoid using root's TMPDIR
unset TMPDIR

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

if [ -f /etc/sysconfig/LCDd ]; then
   . /etc/sysconfig/LCDd
fi

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Check that LCDd.conf exists.
[ -f /etc/LCDd.conf ] || exit 0

RETVAL=0


start() {
        KIND="LCDd"
        echo -n $"Starting $KIND services: "
        daemon LCDd -c /etc/LCDd.conf
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/LCDd || \
           RETVAL=1
        return $RETVAL
}

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

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading smb.conf file: "
        killproc LCDd -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

rhstatus() {
        status LCDd
}


# Allow status as non-root.
if [ "$1" = status ]; then
       rhstatus
       exit $?
fi

# Check that we can write to it... so non-root users stop here
[ -w /etc/LCDd.conf ] || exit 0



case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
  condrestart)
        [ -f /var/lock/subsys/LCDd ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
        exit 1
esac

exit $?


More information about the mythtv-users mailing list