View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Feb 02, 2006 3:10 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
I've had some issues getting irman to work with lirc, but I got the driver working by compiling a new version, problem is though, by removing the old one and installing the new one I messed up my lircd script (there's a script there named lirc, but i't doen's work)

it fails to start up at boot time as well, but I think I can get it going..

so could someone pls post a copy of their lircd script here so I can compare it, I could make an image of my drive and reinstall, but that's somewhat time consuming.

tnx


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 4:01 am 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
Code:
#! /bin/sh
#
#

load_modules ()
{
        local MODULES_MISSING=false

        for mod in $*
        do
                modprobe -k $mod 2> /dev/null || MODULES_MISSING=true
        done

        if $MODULES_MISSING; then
                echo "#####################################################"
                echo "## I couldn't load the required kernel modules     ##"
                echo "## You should install lirc-modules-source to build ##"
                echo "## kernel support for your hardware.               ##"
                echo "#####################################################"
                echo "## If this message is not appropriate you may set  ##"
                echo "## LOAD_MODULES=false in /etc/lirc/hardware.conf   ##"
                echo "#####################################################"
                START_LIRCMD=false
                START_LIRCD=false
        fi
}

build_args ()
{
        local ARGS="$*"
        if [ -n "$DEVICE" ] && [ "$DEVICE" != "none" ]; then
                if [ -d /dev/lirc ] && [ "$DEVICE" = "/dev/lirc" ];then
                        #new device names
                        DEVICE="/dev/lirc/0"
                fi
                ARGS="--device=$DEVICE $ARGS"
        fi
        if [ -n "$DRIVER" ] && [ "$DRIVER" != "none" ]; then
                ARGS="--driver=$DRIVER $ARGS"
        fi
        echo $ARGS
}

test -f /usr/sbin/lircd || exit 0
test -f /usr/sbin/lircmd || exit 0
#test -f /etc/lirc/lircd.conf || exit 0
#test -f /etc/lirc/lircmd.conf || exit 0

START_LIRCMD=true
START_LIRCD=true

if [ ! -f /etc/lirc/lircd.conf ] \
        || grep -q "^#UNCONFIGURED"  /etc/lirc/lircd.conf;then
        if [ "$1" = "start" ]; then
          echo "##################################################"
          echo "## LIRC IS NOT CONFIGURED                       ##"
          echo "##                                              ##"
          echo "## read /usr/share/doc/lirc/html/configure.html ##"
          echo "##################################################"
        fi
        START_LIRCD=false
        START_LIRCMD=false
fi
if [ ! -f /etc/lirc/lircmd.conf ] \
        || grep -q "^#UNCONFIGURED" /etc/lirc/lircmd.conf;then
        START_LIRCMD=false
fi

if [ -f /etc/lirc/hardware.conf ];then
        . /etc/lirc/hardware.conf
fi


case "$1" in
  start)
    if [ "$LOAD_MODULES" = "true" ] && [ "$START_LIRCD" = "true" ]; then
        load_modules $MODULES
    fi
    echo -n "Starting lirc daemon:"
    if $START_LIRCD; then
      echo -n " lircd"
      LIRCD_ARGS=`build_args $LIRCD_ARGS`
      start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $LIRCD_ARGS \
                < /dev/null
    fi
    if $START_LIRCMD; then
      echo -n " lircmd"
      start-stop-daemon --start --quiet --exec /usr/sbin/lircmd \
                < /dev/null
    fi
    echo "."
    ;;
  stop)
    echo -n "Stopping lirc daemon:"
    echo -n " lircmd"
    start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
    echo -n " lircd"
    start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
    echo "."
    ;;
  reload|force-reload)
    if $START_LIRCD; then
      start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
    fi
    if $START_LIRCMD; then
      start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd
    fi
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
    exit 1
esac

exit 0


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 4:34 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
that was fast :D

the startup script is different from the one I got here, but something else is different as well..
by compiling it myself lirc has put its executables in /usr/local/sbin instead of the regular /usr/sbin. weird, I specificly used --bindir. oh, I see, should have used --sbindir... recompiling...

tnx for the help m8!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 3:08 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
When configuring, you should use --prefix=/usr
That way, bindir,sbindir and anyhing else are all placed under /usr.
You may find that you have issues with two versions installed to different locations.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 1:52 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
I did use make uninstall and make clean before I compiled it again, but if I see problems relating to file locations I'll keep that in mind.

Right now I can start the deamon without much problems, irrecord and irw work fine, but there might be some more files I don't know about, maybe better to recompile it with the prefix just to be sure

tnx


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu