[rtg] rtg db is not updating the changes
Laurent
rtg at 085zehn.com
Fri Aug 11 11:42:30 EDT 2006
On 8/11/06, Sekhar <radhiilu at yahoo.com> wrote:
>
> Hi,
>
> I have installed 0.7.4 in my system and it is working fine.I have a
> big problem when add any new router or switch to routers file every
> time i am running rtgtargmkr.pl file to get the targets.cfg file this
> is working fine but the related database is not updating.If i add a
> new customer to my router intrface that interface is not showing
> database for this i have to do manually.when i run rtgtargmkr.pl
> script it will tell us table and id need to update but it does't do
> automatically.
>
> This is problem with RTG or i am missing something.
>
>
It's not a problem with RTG but rather with the targetmaker. Edit the
targetmaker and take a look at the 'find_interface_id' subroutine. In the
'else' statement you should see following:
else {
@row = $sth->fetchrow_array();
$iid = $row[0];
if ( $row[1] ne $desc ) {
print "Interface description changed.\n";
print "Was: \"$row[1]\"\n";
print "Now: \"$desc\"\n";
print "Suggest: UPDATE interface SET description='$desc' WHERE
id=$iid\n";
}
}
Comment the last print statement and replaced with a simple $dbh->do so you
will end up with something like this instead:
else {
@row = $sth->fetchrow_array();
$iid = $row[0];
if ( $row[1] ne $desc ) {
print "Interface description changed.\n";
print "Was: \"$row[1]\"\n";
print "Now: \"$desc\"\n";
#print "Suggest: UPDATE interface SET description='$desc' WHERE
id=$iid\n";
$dbh->do("UPDATE interface SET description='$desc' WHERE
id=$iid");
}
}
>From now on the interfaces should actually have their descriptions updated.
- Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gizmo.fireflynetworks.com/pipermail/rtg/attachments/20060811/feb579f4/attachment.htm
More information about the RTG
mailing list