[mythtv-users] Nearly 100% install of MYTHYV...

Jerry McBride mcbrides9 at comcast.net
Sun Jan 15 22:25:57 UTC 2006


On Sunday 15 January 2006 16:56, Ross Campbell wrote:
> On 1/15/06, Jerry McBride <mcbrides9 at comcast.net> wrote:
> > I am unable to start the mythbackend server via it's startup script.
> > During restart or from a command line, executing the startup script on my
> > gentoo server, "/etc/init.d/mythbackend start" results in normal output,
> > but the backend shuts down almost immediately.
>
> What exactly is in your /etc/init.d/mythbackend script?
>


Here's the script:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/0.18-mythbackend.rc,v 
1.3 2005/05/22 22:43:19 cardoe Exp $

depend() {
	need net
	use mysql
}

checkconfig() {
	if [ ${MYTH_USER} != "root" ]; then
		for i in $(groups "${MYTH_USER/:*/}") ; do
			[[ "${i}" == "audio" ]] && audio="yes"
			[[ "${i}" == "video" ]] && video="yes"
		done

		if [ -z "${audio}" -o -z "${video}" ] ; then
			ewarn ""
			[[ -z "${audio}" ]] && \
			ewarn "${HILITE}${MYTH_USER/:*/}${NORMAL} is not in the audio group"
			[[ -z "${video}" ]] && \
			ewarn "${HILITE}${MYTH_USER/:*/}${NORMAL} is not in the video group"
			ewarn ""
			ewarn "insufficient permissions discovered"
			ewarn "mythbackend may not start correctly"
			ewarn ""
		fi
	fi
}

start() {
	[[ -z "${MYTH_USER}" ]] && MYTH_USER="nobody"
	[[ -z "${MYTH_NICE}" ]] && MYTH_NICE="0"
	[[ -z "${MYTH_VERBOSE}" ]] && MYTH_VERBOSE="none"
	checkconfig

	HOME="/var/log/mythtv/"
	QTDIR=/usr/qt/3

	# Work around any strange permissions that may be on these files.
	chown -R "${MYTH_USER}" /var/log/mythtv/

	ebegin "Starting MythTV Backend"
	start-stop-daemon --start --quiet --chuid "${MYTH_USER}" \
		--exec /usr/bin/mythbackend --nicelevel "${MYTH_NICE}" \
		--make-pidfile --pidfile /var/run/mythbackend.pid \
		--background -- --verbose ${MYTH_VERBOSE} \
		--logfile /var/log/mythtv/mythbackend.log
	eend $?
}

stop () {
	ebegin "Stopping MythTV Backend"
	start-stop-daemon --stop --quiet --pidfile=/var/run/mythbackend.pid
	eend $?
}

# end of script....



> Have your tried running 'strace -o /tmp/mythbackend.out
> /etc/init.d/mythbackend start' and figuring out where the error is?
>

No, I haven't until just now. Running your suggestion gives me a trace of the 
start-and-stop daemon which isn[t of much help. Changing the script to 
eliminate the start-and-stop nonsense and just having mythbackend execute 
under strace... it shows in the last few lines "no setting found for this 
machine... run setup"... Which doesn't make sense to me, because it finds the 
mysql database just fine when mythbackend is executed from a commandline.

Hmmm.... I've got a basic configuration problem with my Gentoo server. 

Wow... where do I start?

Thanks for your help, Ross... at least I'm onto a thread...


More information about the mythtv-users mailing list