summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-15 13:12:01 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-15 13:12:01 -0800
commitba6dc2331c53310ba4e0e8f9cb54717aa7103eb9 (patch)
tree23da1bae8b764a1b7e51f8d10df521c9981db3a0
parent4b8f59856532556d85f54aff259b009a33e14d2a (diff)
downloadvyatta-cfg-quagga-ba6dc2331c53310ba4e0e8f9cb54717aa7103eb9.tar.gz
vyatta-cfg-quagga-ba6dc2331c53310ba4e0e8f9cb54717aa7103eb9.zip
Add hw-id for existing interfaces to config
If config has interface (without hw-id), then add it on boot.
-rwxr-xr-xscripts/system/vyatta_interface_rescan10
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/system/vyatta_interface_rescan b/scripts/system/vyatta_interface_rescan
index 2803099b..bdc8fd67 100755
--- a/scripts/system/vyatta_interface_rescan
+++ b/scripts/system/vyatta_interface_rescan
@@ -96,20 +96,16 @@ sub interface_rescan {
close $dir;
foreach my $ifname (sort @interfaces) {
- my $ifpath = interface_type($ifname) . " $ifname";
- if ($xcp->get_node(['interfaces', $ifpath])) {
- syslog(LOG_INFO, "%s: is already in config file", $ifname);
- next;
- }
-
my $hwaddr = get_hwid("$VYATTAUDEV/$ifname");
unless (persistent_address($hwaddr)) {
- syslog(LOG_INFO, "%s: skipping address %s is not persistent",
+ syslog(LOG_NOTICE, "%s: skipping address %s is not persistent",
$ifname, $hwaddr);
next;
}
# Add new entry to config
+ my $ifpath = interface_type($ifname) . " $ifname";
+
syslog(LOG_INFO, "add config for %s hw-id %s", $ifname, $hwaddr);
$xcp->create_node(['interfaces',$ifpath,"hw-id $hwaddr"]);
}