Commit be08d6db authored by Mac Newbold's avatar Mac Newbold
Browse files

Make it put shark expt IPs in the IP alias column

parent af4a6ad7
......@@ -552,7 +552,13 @@ if (! &ir_exists("/ip")) {
print IRFILE "START mac\n";
foreach (@ip_mac_section) {
($mac,$ip) = @$_;
$sth = $dbh->prepare("UPDATE interfaces set IP = \"$ip\" where MAC = \"$mac\"");
if ( $mac =~ /^08002b81/ ) { #It's a shark
$sth = $dbh->
prepare("UPDATE interfaces set IPalias = '$ip' where MAC = '$mac'");
} else {
$sth = $dbh->
prepare("UPDATE interfaces set IP = '$ip' where MAC = '$mac'");
}
$sth->execute;
print IRFILE "$mac $ip\n";
}
......@@ -566,7 +572,13 @@ if (! &ir_exists("/ip")) {
$ip_mac_raw = "";
foreach (@ip_mac_section) {
($mac,$ip) = @$_;
$sth = $dbh->prepare("UPDATE interfaces set IP = \"$ip\" where MAC = \"$mac\"");
if ( $mac =~ /^08002b81/ ) { #It's a shark
$sth = $dbh->
prepare("UPDATE interfaces set IPalias = '$ip' where MAC = '$mac'");
} else {
$sth = $dbh->
prepare("UPDATE interfaces set IP = '$ip' where MAC = '$mac'");
}
$sth->execute;
$ip_mac_raw .= "$mac $ip\n";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment