Mailing List Archive

Changing hostname breaks mythtv?
I had to change the hostname of my box when I put it on my network (so I
could transfer files and encode to xvid for archival purposes) and when I
changed the hostname from localhost to mythbox I found that I could no
longer use mythtv.

In the front end if i go tv > live tv > it just quits to the desktop. If i
set the hostname back to localhost.localdomain everything works ok, but then
I can't network.

Anyone have a suggestion for poor old shawn?

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail

_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
On Sunday 20 July 2003 07:57 pm, Shawn Jackson wrote:
> I had to change the hostname of my box when I put it on my network (so I
> could transfer files and encode to xvid for archival purposes) and when I
> changed the hostname from localhost to mythbox I found that I could no
> longer use mythtv.
>
> In the front end if i go tv > live tv > it just quits to the desktop. If i
> set the hostname back to localhost.localdomain everything works ok, but
> then I can't network.
>
> Anyone have a suggestion for poor old shawn?

The hostname is used in quite a few places to identify settings local to the
particular machine, which machine a recording is on, etc. If you don't have
anything important in your mythtv setup (recordings you'd like to keep, etc),
it'd really be easiest to just wipe the entire database and reconfigure it
from scratch.

If you don't want to do that, here's a list of what you'll need to change in
the database:

- hostname field in the recorded table (make sure you also re-set the
starttime when you change the hostname, else it'll munge up that and you'll
have to set it again).

- hostname in the settings table.

- hostname in the capturecard table.

- hostname in the transcoding table. Well you probably don't have to change
this one.. Probably weren't using it.

- hostname in the musicplaylist table.

That should be all. Probably could be scripted if someone wanted to
contribute a little 'changehostname' script or whatnot.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
Isaac Richards wrote:

> On Sunday 20 July 2003 07:57 pm, Shawn Jackson wrote:
>
>>I had to change the hostname of my box when I put it on my network (so I
>>could transfer files and encode to xvid for archival purposes) and when I
>>changed the hostname from localhost to mythbox I found that I could no
>>longer use mythtv.
>>
>>Anyone have a suggestion for poor old shawn?
>
> The hostname is used in quite a few places to identify settings local to the
> particular machine, which machine a recording is on, etc. If you don't have
> anything important in your mythtv setup (recordings you'd like to keep, etc),
> it'd really be easiest to just wipe the entire database and reconfigure it
> from scratch.
>
> If you don't want to do that, here's a list of what you'll need to change in
> the database:
>
> - hostname field in the recorded table (make sure you also re-set the
> starttime when you change the hostname, else it'll munge up that and you'll
> have to set it again).
>
> - hostname in the settings table.
>
> - hostname in the capturecard table.
>
> - hostname in the transcoding table. Well you probably don't have to change
> this one.. Probably weren't using it.
>
> - hostname in the musicplaylist table.
>
> That should be all. Probably could be scripted if someone wanted to
> contribute a little 'changehostname' script or whatnot.
>
> Isaac

This seems like an item that should only be entered one time on a config
page.
Brian

_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
On Sunday 20 July 2003 10:38 pm, Brian Kelsay wrote:
> This seems like an item that should only be entered one time on a config
> page.

How?

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
Isaac Richards wrote:

>On Sunday 20 July 2003 10:38 pm, Brian Kelsay wrote:
>
>
>>This seems like an item that should only be entered one time on a config
>>page.
>>
>>
>
>How?
>
>Isaac
>
>
*Relational* database. You could have an ID to name mapping table(2
columnds, 1 row for each frontend) to represent all of your frontends.
The ID would auto-increment from 1, when a new frontend was added, a new
id would be autogenerated. You would only need to update this table if
your host changed. May or may not be more hassle than it's worth, but
easily doable.

-Tupshin

_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
>> This seems like an item that should only be entered one time on a
>> config
>> page.
>
> How?

If anyone cares I started writing a perl script to do this. It works
(so far only set static on the settings table) and its fugly right
now, no strict, no user prompting for entering info yet, no
intelligence ... but it works. I'll clean it up and add the other
tables if anyone actually wants to use it.

--
Lonny


_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
Lonny Selinger wrote:

>>>This seems like an item that should only be entered one time on a
>>>config
>>>page.
>>
>>How?
>
>
> If anyone cares I started writing a perl script to do this. It works
> (so far only set static on the settings table) and its fugly right
> now, no strict, no user prompting for entering info yet, no
> intelligence ... but it works. I'll clean it up and add the other
> tables if anyone actually wants to use it.
>
> --
> Lonny

Exactly what I meant. You already have mysql, so make a user table that
gets filled by entries on the config screens or setup routine. The user
data should really only exist one place.
Brian


_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
comments appended ...

>> If anyone cares I started writing a perl script to do this. It works
>> (so far only set static on the settings table) and its fugly right
>> now, no strict, no user prompting for entering info yet, no
>> intelligence ... but it works. I'll clean it up and add the other
>> tables if anyone actually wants to use it.

> Exactly what I meant. You already have mysql, so make a user table
> that
> gets filled by entries on the config screens or setup routine. The
> user
> data should really only exist one place.

I guess what I'm writing is a bandaid more then anything :) ... I
haven't taken the time to dive into the existing code to see why the
current format was chosen although I'm sure there was a reason for it.
This could entail a bit more then just creating another *unified* user
table but I'm not sure right now (ie: how other code interacts with
the existing db etc).

Anyway I'll clean it up and finish it tomorrow just in case anyone is
interested ... like I said it wont be anything special but it'll work
;)

--
Lonny
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
On Sunday 20 July 2003 11:37 pm, Tupshin Harper wrote:
> Isaac Richards wrote:
> >On Sunday 20 July 2003 10:38 pm, Brian Kelsay wrote:
> >>This seems like an item that should only be entered one time on a config
> >>page.
> >
> >How?
> >
> >Isaac
>
> *Relational* database. You could have an ID to name mapping table(2
> columnds, 1 row for each frontend) to represent all of your frontends.
> The ID would auto-increment from 1, when a new frontend was added, a new
> id would be autogenerated. You would only need to update this table if
> your host changed. May or may not be more hassle than it's worth, but
> easily doable.

Of course, but that'd be an extra join every time I wanted to look up
something based on an arbitrary hostname. It's really too much effort for
something that changes very rarely, and really, the only slightly tricky
thing to update is the recorded table since you have to hit up the starttime
field.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
On Monday 21 July 2003 12:32 am, Lonny Selinger wrote:
> I guess what I'm writing is a bandaid more then anything :) ... I
> haven't taken the time to dive into the existing code to see why the
> current format was chosen although I'm sure there was a reason for it.
> This could entail a bit more then just creating another *unified* user
> table but I'm not sure right now (ie: how other code interacts with
> the existing db etc).
>
> Anyway I'll clean it up and finish it tomorrow just in case anyone is
> interested ... like I said it wont be anything special but it'll work
> ;)

I'll stick it in the contrib/ dir and ask Robert to make a note of it in the
docs once you send it in, thanks.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing hostname breaks mythtv? [ In reply to ]
On Sun, 20 Jul 2003, Isaac Richards wrote:

> On Sunday 20 July 2003 10:38 pm, Brian Kelsay wrote:
> > This seems like an item that should only be entered one time on a config
> > page.
>
> How?
>
> Isaac

hosts table. Identify hosts by a hostid, which won't change. Put the
hostname in the hosts table.

I know, I know, "send a patch". ;-) My excuse is I'm moving countries
this week.

Steve


_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
RE: Changing hostname breaks mythtv? [ In reply to ]
That is no excuse. As they say in the windows world (for different
reasons) Patch early, Patch often. I moved country three (and a half)
years ago, and I packed nothing until the night before. Any argument to
the contrary is, of course, nonsense*!! I should stop now (before my
post (looks too much) (like lisp) code) =P


* disclaimer: I was 19 at the time, and owned pretty much nothing.

-----Original Message-----
From: Stephen Davies [mailto:steve@daviesfam.org]
Sent: Monday, July 21, 2003 2:19 AM
To: Discussion about mythtv
Subject: Re: [mythtv-users] Changing hostname breaks mythtv?



On Sun, 20 Jul 2003, Isaac Richards wrote:

> On Sunday 20 July 2003 10:38 pm, Brian Kelsay wrote:
> > This seems like an item that should only be entered one time on a
config
> > page.
>
> How?
>
> Isaac

hosts table. Identify hosts by a hostid, which won't change. Put the
hostname in the hosts table.

I know, I know, "send a patch". ;-) My excuse is I'm moving countries
this week.

Steve


_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users