Commit 5c53a981 authored by Leigh B Stoller's avatar Leigh B Stoller

Save card,port info into card_saved,port_saved when creating missing

interfaces from the wires table. Helpful for debugging.
parent 5bfec88d
......@@ -493,6 +493,24 @@ sub CreateIface($$)
if (!defined($interface)) {
fatal("Could not create new interface");
if (!$NOSAVED) {
# Update the saved fields in the interface so we do not lose it.
# And so we can rerun the script and have the right stuff happen.
if ($interface->card_saved() != $card ||
$interface->port_saved() != $port) {
print STDERR "Updating saved card,port for $interface\n";
my $q = "update interfaces set ".
"card_saved='$card', port_saved='$port' ".
"where node_id='$node_id' and iface='$iface'";
if (!$impotent) {
sub fatal($)
Markdown is supported
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