[mythtv-users] Two lingering issues with 0.20 and/or Ubuntu

Michael Tiller michael.tiller at gmail.com
Thu Nov 9 18:46:36 UTC 2006


Mario,

  Thanks for the response.  I did not use mythtv as my first user.  In fact,
I used your guide <https://wiki.ubuntu.com/Install_IVTV_Edgy> (which I think
is quite good) which is how I knew not to do this. :-)

  Note that I have no trouble starting it manually (via sudo).  I have added
three lines which I've highlighted in red.  When I get home I'll try taking
them out and see if they make a difference but if the script is run as root
I can't see why it would make a difference.

  I dont know what the lines:
# Default-Start:     24
# Default-Stop:      S
...mean but I'm assuming they are fine as configured.

  Note that everything in red is a hack so I'm working on trying to
eliminate the need for them.  I know that somehow udev is responsible for
the permissions on ttyS0 but I have yet to figure out how to specify a rule
so it gets the permissions right.  The other two things Myth should do for
me but does not seem to?!?

  Thanks for any ideas.

--
Mike

#! /bin/sh
### BEGIN INIT INFO
# Provides:          mythtv-backend
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     24
# Default-Stop:      S
# Short-Description: Start/Stop the MythTV server.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/mythbackend
NAME="mythbackend"
DESC="MythTV server"

# Add this to make sure we can
# change channels
chmod a+rw /dev/ttyS0

test -x $DAEMON || exit 0

set -e

USER=mythtv
RUNDIR=/var/run/mythtv
ARGS="--daemon --logfile /var/log/mythtv/mythbackend.log --pidfile
$RUNDIR/$NAME
.pid"
EXTRA_ARGS=""
NICE=0

if [ -f /etc/default/mythtv-backend ]; then
  . /etc/default/mythtv-backend
fi

ARGS="$ARGS $EXTRA_ARGS"

mkdir -p $RUNDIR
chown -R $USER $RUNDIR


case "$1" in
  start)
        if test -e $RUNDIR/$NAME.pid ; then
                echo "mythbackend already running, use restart instead."
        else
                echo -n "Starting $DESC: $NAME"
                ivtvctl --set-input 0
                ivtv-tune -c 3
                start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
                        --chuid $USER --nicelevel $NICE --exec $DAEMON --
$ARGS
                echo "."
        fi
        ;;




On 11/9/06, Mario Limonciello <mario.mailing at gmail.com> wrote:
>
> Mike,
>
> Recently, I have seen a few posts similar that people can't get the
> backend to launch from myth init scripts in Ubuntu.  I'm trying to find
> something common between them but have yet to.  I personally have 2 ubuntu
> backends, and haven't come up with any problems with either init script.
>
> By some weird chance, when you did your ubuntu install - your "first" user
> - did you use mythtv?  Your not supposed to as this user is created when
> you install myth and is used for myth.  If that is what you did, then I've
> got some ideas what we can do.
>
> If this isn't what you did, then we need to walk through the init script
> and find where the trouble is.  What guide did you follow for installation?
> Did you follow a guide?
>
> Regards,
>
> Mario
>
> On 11/9/06, Michael Tiller <michael.tiller at gmail.com> wrote:
>
> > I've nearly got my new Ubuntu based MythTV 0.20 system into a robust
> > state.  I've just got two little things left that I'm having trouble with
> > and hopefully somebody here can point me to a solution.
> >
> > The first issue is that when I reboot, it does not start the backend.
> > There is a script in /etc/init.d called "mythtv-backend" that was installed
> > when I installed MythTV from the repositories.  However, it does not appear
> > to get run?!?  If I remove /var/log/mythbackend.log and then touch it and
> > chown it to get it to a "0 size" state and then reboot it remains empty.
> > Any idea what is going on there?  Is there anything I have to do to (apart
> > from putting the file in /etc/init.d) that I have to do to get the system to
> > invoke it (I know how this is done in FC but I'm fairly new to Ubuntu,
> > sorry).
> >
> > As a side note, is this script run as root?  I assume so.  I ask because
> > I need to do a few things as root inside this script to get the system
> > properly set up.
> >
> > Actually that leads to another question...I'm having to run ivtvctl and
> > ivtv-tune in /etc/init.d/mythtv-backend.  This is because even though I have
> > specified to use the tuner input and what the tuner channel should be set
> > to, the backend doesn't seem to apply these properly.  Any ideas on what
> > might be going on?
> >
> > The last issue is that, once I get the backend up and running, the first
> > time I go to "WatchTV" it just comes back to the menu after showing a blank
> > screen for a few seconds.  The second time I go to watch TV, it works (and
> > from then on).  Any ideas?  I suspect a similar thing might happen for the
> > first attempted recording (if nobody has watched TV) which could cause me to
> > miss recordings.
> >
> > Thanks for any pointers.
> >
> > --
> > Mike
> >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20061109/d29fca91/attachment.htm 


More information about the mythtv-users mailing list