summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/Vyatta/Misc.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index 3c89871..83cc36e 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -22,15 +22,14 @@
# **** End License ****
package Vyatta::Misc;
+use strict;
+
require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(get_sysfs_value getInterfaces getNetAddIP isIpAddress is_ip_v4_or_v6 is_dhcp_enabled is_address_enabled);
-@EXPORT_OK = qw(get_sysfs_value getNetAddIP isIpAddress is_ip_v4_or_v6
+our @ISA = qw(Exporter);
+our @EXPORT = qw(get_sysfs_value getInterfaces getNetAddIP isIpAddress is_ip_v4_or_v6 is_dhcp_enabled is_address_enabled);
+our @EXPORT_OK = qw(get_sysfs_value getNetAddIP isIpAddress is_ip_v4_or_v6
getInterfacesIPadresses getPortRuleString);
-
-use strict;
-
use Vyatta::Config;
use Vyatta::Interface;
use NetAddr::IP;
@@ -103,7 +102,8 @@ sub getIP {
my ($name, $type) = @_;
my @addresses;
- open my $ipcmd, "ip addr show dev $name |"
+ open my $ipcmd, '-|'
+ or exec qw(ip addr show dev), $name
or die "ip addr command failed: $!";
<$ipcmd>;