Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101009 - mythtv 0.18.1 Init.d script set config directory to /var/log/mythtv
Summary: mythtv 0.18.1 Init.d script set config directory to /var/log/mythtv
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-01 10:41 UTC by Rob Smith
Modified: 2006-03-09 22:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Smith 2005-08-01 10:41:01 UTC
Mythtv 0.18.1 's init.d script sets the HOME var to /var/log/mythtv. This is
where the .mythtv config settings file is stored. This should be set to
/etc/mythtv/ or similar.

Also, there this line in it:

chown -R "${MYTH_USER}" /var/log/mythtv/

it should be

chown -R "${MYTH_USER}" "${HOME}"

Thanks!

Reproducible: Always
Steps to Reproduce:
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2005-08-01 16:48:04 UTC
Nope. There's a good reason for this.
Comment 2 Rob Smith 2005-08-01 17:05:56 UTC
This is really a non standard behavior, and one that very few users will
understand. I beleive that there is a better method to solve whatever problem
you are attempting to fix via this hack. We really should try to stay within the
norms.
Comment 3 Thomas Gereke 2005-11-02 02:35:39 UTC
Hello,

I think this now is indeed a bad solution. I had problems to start
/etc/init.d/mythbackend. The init script reported ok, but ps ax showed me that
there is no mythbackend running. /var/log/mythtv/mythbackend.log was empty!
Instead I found .qt/ and .mythtv/ and .mythtv/mysql.txt in the directory.

I played around with some settings in /etc/[init|conf].d/mythbackend. So this is
what I've found: mythbackend creates a .mythtv/mysql.txt in its home directory
if there is none. This default file contains the default password for mysql user
mythtv (mythtv). As I changed this password (I'm running phpmyadmin) mythbackend
couldn't connect to mysql (why it's not logged - I don't know).

I now changed the home dir in /etc/init.d/mythbackend to the home dir of the
user running mythbackend (where a correct version of mysql.txt is) and
everything is now ok.

So there is a need to change the home dir. Even better might be to not change
the home dir for mythbackend. But the user running mythbackend must have write
access to /var/log/mythtv.

So 

chown -R "${MYTH_USER}" /var/log/mythtv/

is correct, but the home dir must be set to the home dir of ${MYTH_USER}.
The file mysql.txt is a config file, also created by mythsetup.

Thanks!
Comment 4 Rob Smith 2005-11-02 08:45:44 UTC
A solution I use is I set myth's home dir to /etc/mythtv, which mythfrontend and 
backend both check. This is editable in /etc/init.d/mythbackend.

In any case, cardoe does have a reason for doing this, but it is a special case 
situation not many people will run into. We really should look into fixing the 
bug that causes that special situation and then we can go back to the standard 
behaviour.

Also, to run something like mythfilldatabase, you will need to do something akin 
to

HOME="/var/log/mythtv" mythfilldatabase

and it will work fine. We should update the mythtv howto with this info if it's 
not already in there.
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2006-03-09 22:30:54 UTC
Use MythTV 0.19