Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9482 closed Patch - Bug Fix (Fixed)

mythconverg_restore.pl --change_hostname breaks things if old_hostname is 'myth'

Reported by: Alex Tomlins <alex@…> Owned by: mdean
Priority: minor Milestone: 0.23-fixes
Component: MythTV - General Version: 0.24-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

There's an issue with the mythconverg_restore.pl script when renaming a host. If the old_hostname is 'myth' then lots of values in the setting table get clobbered.

For example when renaming a host from myth to myth-fe1 all the mythvideo.* setting are renamed to myth-fe1video.*

I've tracked the problem down to the core that handles changing the hostname in the SGweightPerDir values.

I've also noticed another problem with the current code. If the old_hostname appears in the directory part, this will get changed as well.

I've updated the code to be much more specific about what it changes. Patch attached (created with git format-patch).

Attachments (1)

0001-Make-mythconverg_restore.pl-change_hostname-not-brea.patch (1.3 KB) - added by Alex Tomlins <alex@…> 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by Alex Tomlins <alex@…>

comment:1 Changed 3 years ago by mdean

  • Milestone changed from unknown to 0.23-fixes
  • Resolution set to Fixed
  • Status changed from new to closed

In c086645cee9830a7865be85f13ce98323fd50c36:

Fix restore script host name change with generic names.

Fix the restore script's --change_hostname functionality to work
properly even with generic host names, like "myth" or "a".

Thanks to Alex Tomlins for the patch. Refs #9482.

(backported to 0.24-fixes in 46a0ddaccaef31d24cc479932e378e67ffe2bcd2 ,
and to 0.23-fixes in 4e3b56df4d2a293d1773ebc8d8aec3d98618ef44 )

comment:2 Changed 3 years ago by mdean

  • Owner set to mdean

comment:3 Changed 3 years ago by Alex Tomlins

Fix restore script host name change with generic names.

Fix the restore script's --change_hostname functionality to work
properly even with generic host names, like "myth" or "a".

Thanks to Alex Tomlins for the patch. Refs #9482.

Changeset: c086645cee9830a7865be85f13ce98323fd50c36

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.