summaryrefslogtreecommitdiff
path: root/scripts/system
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/system')
-rwxr-xr-xscripts/system/vyatta_interface_rescan7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/system/vyatta_interface_rescan b/scripts/system/vyatta_interface_rescan
index 5b72a480..eb45da60 100755
--- a/scripts/system/vyatta_interface_rescan
+++ b/scripts/system/vyatta_interface_rescan
@@ -115,6 +115,13 @@ sub interface_rescan {
foreach my $ifname (sort @interfaces) {
my $hwaddr = get_hwid("$VYATTAUDEV/$ifname");
+
+ # Ignore devices that disappear (or get renamed)
+ unless (-d "/sys/class/net/$ifname") {
+ syslog(LOG_INFO, "%s: does not exist", $ifname);
+ next;
+ }
+
unless (persistent_address($hwaddr)) {
syslog(LOG_NOTICE, "%s: skipping address %s is not persistent",
$ifname, $hwaddr);