Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit c086645cee9830a7865be85f13ce98323fd50c36 1 parent e4f6977
@alext alext authored sphery committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 mythtv/programs/scripts/database/mythconverg_restore.pl
View
8 mythtv/programs/scripts/database/mythconverg_restore.pl
@@ -13,7 +13,7 @@
# Script info
$NAME = 'MythTV Database Restore Script';
- $VERSION = '1.0.16';
+ $VERSION = '1.0.17';
# Some variables we'll use here
our ($username, $homedir, $mythconfdir, $database_information_file);
@@ -1435,9 +1435,9 @@
$query = "UPDATE $table_name SET value = REPLACE(value, ?, ?)".
" WHERE value LIKE ?";
$sth_update = $dbh->prepare($query);
- $sth_update->bind_param(1, $old_hostname);
- $sth_update->bind_param(2, $new_hostname);
- $sth_update->bind_param(3, '%'.$old_hostname.'%');
+ $sth_update->bind_param(1, 'SGweightPerDir:'.$old_hostname.':');
+ $sth_update->bind_param(2, 'SGweightPerDir:'.$new_hostname.':');
+ $sth_update->bind_param(3, 'SGweightPerDir:'.$old_hostname.':%');
$result = $sth_update->execute;
if (!defined($result))
{

0 comments on commit c086645

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