← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 505705] Re: irexec isn't started automatically on existing installs

 

I see the same problems on one of my clients systems. On my own system this bug is not present.
restarting gdm makes irexec also starting. I have confirmed that this is due to a timing issue between gdm and lirc in upstart.
gdm and /usr/share/mythbuntu/session.sh are started before lircd is running. 
I have added the following to the start of session.sh. This cures at least the symptom:

BTW, the same problem exists for /usr/share/mythtv/mythfrontend.sh

LOGFILE="/var/log/winebox.log"
LOGENTRY="$(date +"%b %d %T") Session.sh:"

    echo $LOGENTRY "Are mysql, mythbackend and lirc runnning" | tee -a $LOGFILE
    delay=30
    while [ ! "$(pidof mysqld)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No mysqld yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof mysqld)" ]; then
	echo $LOGENTRY mysqld started. pid is $(pidof mysqld) | tee -a $LOGFILE
    fi
    while [ -z "$(pidof mythbackend)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No mythbackend yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof mythbackend)" ]; then
	echo $LOGENTRY mythbackend started. pid is $(pidof mythbackend) | tee -a $LOGFILE
    fi
    while [ ! "$(pidof lircd)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No lircd yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof lircd)" ]; then
	echo $LOGENTRY lircd started. pid is $(pidof lircd) | tee -a $LOGFILE
    fi

-- 
irexec isn't started automatically on existing installs
https://bugs.launchpad.net/bugs/505705
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.

Status in Mythbuntu, Ubuntu derivative focused upon MythTV: Confirmed
Status in “lirc” package in Ubuntu: Confirmed

Bug description:
Irexec does not start with the lirc service on 9.10 (Ubuntu+MythTV, not Mythbuntu). In my testing, it seems that the following line might be the issue.

(from /etc/init.d/lirc)
start-stop-daemon --start --quiet --oknodo --exec /usr/bin/irexec -- -d /etc/lirc/lircrc < /dev/null

I've compared my two systems and there doesn't seem to be that big of difference (one is Mythbuntu, the other is Ubuntu+MythTV). The Mythbuntu system works correctly where the Ubuntu+MythTV does not.

/etc/lirc/lircrc does not exist on either system.

If I edit the line to just

start-stop-daemon --start --quiet --oknodo --exec /usr/bin/irexec --

Then it does work, but it stays in the terminal and thus is not really a viable option.