summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/vyatta-interfaces.pl8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 8fc5226..60e0c84 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -85,12 +85,8 @@ exit 0;
sub is_ip_configured {
my ($intf, $ip) = @_;
- my $wc = `ip addr show $intf | grep -c $ip`;
- if (defined $wc and $wc > 0) {
- return 1;
- } else {
- return 0;
- }
+ my @found = grep $ip, getIP($intf);
+ return $#found;
}
sub is_ip_duplicate {