LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-19-2006, 09:05 PM   #1
Shawn Parr
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
Question SUSE 10 init script problems with MythTV


Okay, I've been playing with this for a couple of days, and have searched around and not found a solution yet, so I'm gonna ask you guys if anyone can help.

I have a SUSE 10 box fully set up, most services are running just fine, mostly mysql to support Myth and misterhouse for some basic home automation stuff.

Myth is up and running, I just want to get the mythbackend running as a daemon that starts at boot with the other services. I have a script and it is in /etc/init.d and the symbolic links are all created (I did it by hand first, then tried insserv just in case). This script is the very last item called during boot, after GDM and all should be loaded (the script says requires "$ALL").

Basically I have created a user called mythtv and that home folder (/home/mythtv) is where all the recordings will be stored and where the config info is (what isn't in mysql of course).

My first try at starting mythbackend in the init script was this:

Code:
MYTH_ROOT=/home/mythtv/
MYTH_BIN=/usr/local/bin/mythbackend
MYTH_LOG=/home/mythtv/mythbackend_log.txt
test -x $MYTH_BIN || exit 5

start() {

   startproc -u mythtv -g video $MYTH_BIN -d -l $MYTH_LOG &
RETVAL=$?
return $RETVAL
}
When I boot the machine I get this:

Quote:
shawn@myth:/home/mythtv> more mythbackend_log.txt
2006-04-19 20:42:04.336 Using runtime prefix = /usr/local
2006-04-19 20:42:04.812 Unable to read configuration file mysql.txt
2006-04-19 20:42:05.807 Trying to create a basic mysql.txt file
2006-04-19 20:42:06.017 Could not create //.mythtv
2006-04-19 20:42:06.348 Failed to init MythContext, exiting.
Okay, so it isn't using the right home directory, it is assuming / instead of /home/mythtv. So for fun I try firing it up as another user, and using sudo and get the following:

Quote:
Starting MythBackend done
shawn@myth:/home/mythtv> more mythbackend_log.txt
2006-04-19 20:45:00.154 Using runtime prefix = /usr/local
2006-04-19 20:45:01.199 New DB connection, total: 1
2006-04-19 20:45:01.218 Connected to database 'mythconverg' at host: localhost
2006-04-19 20:45:01.355 Current Schema Version: 1123
Starting up as the master server.
That time it has no trouble, it even seems to be properly using /home/mythtv as its home folder.

So for fun I try to use the startproc -c switch to set a root folder:

Code:
MYTH_ROOT=/home/mythtv/
MYTH_BIN=/usr/local/bin/mythbackend
MYTH_LOG=/home/mythtv/mythbackend_log.txt
test -x $MYTH_BIN || exit 5

start() {

   startproc -u mythtv -g video -c $MYTH_ROOT $MYTH_BIN -d -l $MYTH_LOG &
RETVAL=$?
return $RETVAL
}
Wow does this fail miserably. No log is created at all during the boot process, so it is failing miserably. And when I try to do it manually:

Code:
shawn@myth:~> sudo /etc/init.d/mythbackend start
Password:
Starting MythBackend startproc: cannot stat /home/mythtv//usr/local/bin/mythbackend: No such file or directory
                                                                      done
shawn@myth:~>
No go!

I have also tried that second solution by removing the /usr/local/bin specification from $MYTH_BIN in the script, but that doesn't run at all, just stops without any input whether at boot or via sudo manually.

Okay, I'm probably overlooking something very obvious here. Unfortunately mythbackend does not have a switch that allows you to tell it explicitly where to find its dot configuration files/home folder, as that would obviously make things work for me.

Any suggestions what to try? I would really like to get this working. I realize I could do this with autologin of the myth user with a script in that home folder, and then setup the frontend first, but at this time I'm not sure if I will run the frontend and backend on the same machine, so I want to ensure the backend is running whenever possible.

I should also mention that as of now, no other messages are in my system logs except the path issue with try #2 (startproc: cannot stat /home/mythtv//usr/local/bin/mythbackend)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSE 10 Mythtv guide Alinuxnoob SUSE / openSUSE 3 04-01-2006 07:44 PM
mythtv problems canyon289 Linux - Software 3 08-21-2005 05:50 PM
SuSE 9.2 Network init problems tpe Linux - Hardware 4 04-28-2005 03:27 AM
SuSE 9.2 Network init problems tpe Linux - Hardware 2 04-19-2005 10:44 AM
MythTV install on suse 9.1 YARDofSTUF Linux - Software 8 12-18-2004 10:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration