MT#8773 ngcp-sync-constants: grant user sipwise on pair when running with '-r' option

Change-Id: I4f147fcae147e9c37b8f51dc5a9e1d946b716601
changes/04/104/1
Victor Seva 12 years ago
parent 7d422b7878
commit 0311a396c9

@ -526,6 +526,13 @@ sub do_pair_sync {
print "Syncing ".CONSTANTS_YML." -> MySQL ... ";
print "\n" if $debug;
sync_mysql_data($dbh);
if ($mysql_root) {
# mysql sipwise user
my ($mysql_user, $mysql_pass) = get_mysql_credentials();
my @hosts = ('localhost');
grant_user(dbh => $dbh, user => $mysql_user, hosts => \@hosts, repuser => 0 );
sync_user( dbh => $dbh, user => $mysql_user, pass => $mysql_pass );
}
};
if ($@) {
$dbh->rollback;

Loading…
Cancel
Save