summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-09 14:28:40 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-09 14:28:40 -0800
commit5a1dfa9b190f57cbda4e4af78fc8ba214f65c8d7 (patch)
treec78bcbaa3ec20617ad96731d0896ae63a5c6433e
parentfa969321e4e974f86429a47fcede2407d1383575 (diff)
parent0b582e0ca240c9a809f2fed2d3bf3bb339f2b365 (diff)
downloadvyatta-cfg-5a1dfa9b190f57cbda4e4af78fc8ba214f65c8d7.tar.gz
vyatta-cfg-5a1dfa9b190f57cbda4e4af78fc8ba214f65c8d7.zip
Merge branch 'islavista' of suva.vyatta.com:/git/vyatta-cfg into islavista
-rwxr-xr-xscripts/VyattaMisc.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/VyattaMisc.pm b/scripts/VyattaMisc.pm
index 7072908..89d68d6 100755
--- a/scripts/VyattaMisc.pm
+++ b/scripts/VyattaMisc.pm
@@ -56,10 +56,12 @@ sub getInterfacesIPadresses {
$is_intf_interface_type = 1;
}
if ($is_intf_interface_type > 0) {
- $intf_ips[$intf_ips_index] =
+ my @ips = ();
+ @ips =
`ip addr show $intf_system 2>/dev/null | grep inet | grep -v inet6 | awk '{print \$2}'`;
- if (!($intf_ips[$intf_ips_index] eq '')){
- $intf_ips_index++;
+ chomp @ips;
+ if (scalar(@ips) > 0){
+ push @intf_ips, @ips;
}
}
}