diff options
author | Stig Thormodsrud <stig@io.vyatta.com> | 2008-12-01 20:46:23 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@io.vyatta.com> | 2008-12-01 20:46:23 -0800 |
commit | 9f895b22a3bc51a27eb3a7de51a86826e8265bda (patch) | |
tree | bc0e38170513fa41bab8cca4a85491a9ee452a7d | |
parent | 10ebe0dbf9e7a01c2dc93253a0d2bafe788b8fa9 (diff) | |
download | vyatta-op-9f895b22a3bc51a27eb3a7de51a86826e8265bda.tar.gz vyatta-op-9f895b22a3bc51a27eb3a7de51a86826e8265bda.zip |
"show interfaces" broken. Use new perl hierarchy.
-rwxr-xr-x | scripts/vyatta-show-interfaces.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl index f006d0f..02ad8e0 100755 --- a/scripts/vyatta-show-interfaces.pl +++ b/scripts/vyatta-show-interfaces.pl @@ -24,8 +24,8 @@ # use lib "/opt/vyatta/share/perl5/"; -use VyattaConfig; -use VyattaMisc; +use Vyatta::Config; +use Vyatta::Misc; use Getopt::Long; use POSIX; use NetAddr::IP; @@ -94,7 +94,7 @@ sub get_intf_description { if (!defined $intf_type) { return ""; } - my $config = new VyattaConfig; + my $config = new Vyatta::Config; my $path; if ($intf =~ m/([a-zA-Z]+\d+)\.(\d+)/) { $path = "interfaces $intf_type $1 vif $2"; @@ -115,7 +115,7 @@ sub get_intf_stats { my %stats = (); foreach my $var (@rx_stat_vars, @tx_stat_vars) { - $stats{$var} = VyattaMisc::get_sysfs_value($intf, "statistics/$var"); + $stats{$var} = get_sysfs_value($intf, "statistics/$var"); } return %stats; } @@ -178,12 +178,12 @@ sub get_state_link { my $intf = shift; my $state; my $link = 'down'; - my $flags = VyattaMisc::get_sysfs_value($intf, 'flags'); + my $flags = get_sysfs_value($intf, 'flags'); my $hex_flags = hex($flags); if ($hex_flags & 0x1) { # IFF_UP $state = 'up'; - my $carrier = VyattaMisc::get_sysfs_value($intf, 'carrier'); + my $carrier = get_sysfs_value($intf, 'carrier'); if ($carrier eq '1') { $link = "up"; } |