Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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.
(cherry picked from commit c086645)
  • Loading branch information...
commit 46a0ddaccaef31d24cc479932e378e67ffe2bcd2 1 parent 2394a9d
Alex Tomlins alext authored sphery committed

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 mythtv/programs/scripts/database/mythconverg_restore.pl
8 mythtv/programs/scripts/database/mythconverg_restore.pl
@@ -13,7 +13,7 @@
13 13
14 14 # Script info
15 15 $NAME = 'MythTV Database Restore Script';
16   - $VERSION = '1.0.16';
  16 + $VERSION = '1.0.17';
17 17
18 18 # Some variables we'll use here
19 19 our ($username, $homedir, $mythconfdir, $database_information_file);
@@ -1435,9 +1435,9 @@
1435 1435 $query = "UPDATE $table_name SET value = REPLACE(value, ?, ?)".
1436 1436 " WHERE value LIKE ?";
1437 1437 $sth_update = $dbh->prepare($query);
1438   - $sth_update->bind_param(1, $old_hostname);
1439   - $sth_update->bind_param(2, $new_hostname);
1440   - $sth_update->bind_param(3, '%'.$old_hostname.'%');
  1438 + $sth_update->bind_param(1, 'SGweightPerDir:'.$old_hostname.':');
  1439 + $sth_update->bind_param(2, 'SGweightPerDir:'.$new_hostname.':');
  1440 + $sth_update->bind_param(3, 'SGweightPerDir:'.$old_hostname.':%');
1441 1441 $result = $sth_update->execute;
1442 1442 if (!defined($result))
1443 1443 {

0 comments on commit 46a0dda

Please sign in to comment.
Something went wrong with that request. Please try again.