summaryrefslogtreecommitdiff
path: root/scripts/vyatta-show-interfaces.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-02 17:20:30 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-02 17:20:30 -0800
commit9584cbdfe3a91ee6b2868a43fc699fbe6aaf9bbd (patch)
treed6e2094b99cf08e7761520fa70e3ba459e238e2a /scripts/vyatta-show-interfaces.pl
parent1fd9f1f09f8841b72080233ab0eee93bc0760ae3 (diff)
downloadvyatta-op-9584cbdfe3a91ee6b2868a43fc699fbe6aaf9bbd.tar.gz
vyatta-op-9584cbdfe3a91ee6b2868a43fc699fbe6aaf9bbd.zip
Use getInterfaces in vyatta-show-interfaces.pl
Avoid problems with bonding_masters file in /sys/class/net
Diffstat (limited to 'scripts/vyatta-show-interfaces.pl')
-rwxr-xr-xscripts/vyatta-show-interfaces.pl7
1 files changed, 1 insertions, 6 deletions
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl
index 4d89bc3..9fc1415 100755
--- a/scripts/vyatta-show-interfaces.pl
+++ b/scripts/vyatta-show-interfaces.pl
@@ -150,12 +150,7 @@ sub is_valid_intf {
sub get_intf_for_type {
my $type = shift;
-
- my $sysnet = "/sys/class/net";
- opendir (my $dir, $sysnet) or die "can't open $sysnet";
- my @interfaces = grep { !/^\./ } readdir($dir);
- closedir $dir;
-
+ my @interfaces = getInterfaces();
my @list = ();
foreach my $name (@interfaces) {
if ($type) {