[mythtv] Hostname change broke mythtv, yet alittle more complicated than sed can fix...
kenneth.padgett at gmail.com
Wed Oct 18 06:47:21 UTC 2006
So it wasn't until after a change in hostname did I realize mythtv was
going to break everything and loose track of my settings, recordings,
everything basically, but even worse, it created new junk hostname
settings and such I need to get rid of!!!
The problem actually was caused by a swap out of routers and change in
reverse DNS (which is how my box has been getting it's names). Anyway,
the problem I have now is, through various router swaps/reconfigures,
the box has taken on 3 different names over the past year (3 different
routers w/ different DNS names wouldn't you know), and there's three
sets of settings. The ones I want is mythtv.local, the others are
pvr.lan and localhost.localdomain. The box is now named
localhost.localdomain as I realized naming the box on the router's DNS
is what was causing all this, so I give up with that. Also, I can't
easily go back to mythtv.local on my router, I know, that would be too
If I do the sed trick documented here:
I'm going to end up duplicating settings table entries, and possibly
other things, since I need to go to a host name that mythbackend
apparently took it upon itself to start creating the moment the box
booted up with the new name.
At this point, all I really care about is the settings, previously
recorded shows, and recordings it should be recording (but claims I
haven't scheduled anything). What's the fix here? I fear duplicating
entries in the settings table using sed is going to cause unforeseen
issues. Can I do some magic command line on mythbackend and have it
figure this out on it's own? I didn't see a --renamehost in it's
--help or the docs/wiki. :) Recommendations from the dev's would be
Also, has anyone considered a better route for tracking the settings
per host, or maybe normalizing the DB so that the hostname is easier
to update? Or even a prompt when it first starts about creating new
settings and such for a new host name? I'd rather mythbackend have
errored out when it realized the hostname changed instead of just
creating new entires. Maybe a command line option required by
mythbackend to "name" your host, so no matter what the DNS changes to,
mythbackend knows it's own name...
Thanks for your time!
More information about the mythtv-dev