[mythtv-users] Possible Errata/Bug Myth

Steven Adeff adeffs.mythtv at gmail.com
Mon Apr 17 20:19:08 UTC 2006


On 4/17/06, R. G. Newbury <newbury at mandamus.org> wrote:
> Michael T. Dean wrote:
> >> This caused the mysql.txt file
> >>to be created (if not already present) with the default value of
> >>localhost as the master backend hostname.
> >>
> >>Is this a bug/errata?
> >
> >
> > No.  MythTV programs (mythtv-setup, mythbackend, mythfrontend) will use
> > $HOME/.mythtv for the configuration directory.  So, if you run
> > mythtv-setup as the root user, it makes $HOME/.mythtv/mysql.txt (
> > /root/.mythtv/mysql.txt ).  Then, if you attempt to start the service,
> > which runs mythbackend as mythtv (as it should), it looks for mysql.txt
> > in $HOME/.mythtv/mysql.txt (which, for it, is
> > /home/mythtv/.mythtv/mysql.txt).
>
> Except that under FC5 you *cannot* run /etc/init.d/mythbackend as
> anything BUT the root user. The script (and /etc/sysconfig/mythbackend)
> both have a place for defining {MBE_USER} which by default is 'root'.
> The start portion of the script calls "daemon /path_to/mythbackend -d -l
> /somelogfile"
>
> DAEMON then changes to the folder /root/  which of course fails if the
> user is anything BUT 'root'.
>
> This also means that the frontend user cannot run 'service mythbackend
> restart' to clear a locked crashed process.
>
> My attempts at using  daemon --nochdir (--nochngdir??) have not been
> successful....
>
> Ohh BTW, FC5 denies graphical login to the root user. I have grave
> doubts that I will be able to explain to my wife how to re-set the
> mythbox if the backend crashes. And its a PITA for me to do too.
>
> Work-arounds or corrections needed.
>
> Geoff

I have the power button for my case run a custom script. It does two
things, first it kills mythfrontend, then it checks if mythbackend is
running. If it is it quits the script (as there is nothing left for it
to do), if its not it runs "/etc/init.d/mythbackend start".

I use this mainly for when mythfrontend freezes and I need to kill it
without SSH'ing into the box, and in the off chance mythbackend dies
it starts it back up. Since the script is run as root it has
permissions

the beauty of this is that if someone accidentaly hits the power
button all it does is restart mythfrontend. I have to SSH in to shut
down the machine, but since its I rarely do its not an issue.

--
Steve


More information about the mythtv-users mailing list