summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Interface.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 16:12:04 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 16:12:04 -0700
commitb9f112c2be89b472e3733cd081777be45b1c6ac7 (patch)
tree606ea60f4d054b414ebb2ced9fd67d972353ff1b /lib/Vyatta/Interface.pm
parentdcafde062d6ac92edbfd0472a31f13e87b6d698c (diff)
downloadvyatta-cfg-b9f112c2be89b472e3733cd081777be45b1c6ac7.tar.gz
vyatta-cfg-b9f112c2be89b472e3733cd081777be45b1c6ac7.zip
Allow reading interface description outside config mode
The Interface() object doesn't work for PPP in operational mode. So split out interface_description routine.
Diffstat (limited to 'lib/Vyatta/Interface.pm')
-rwxr-xr-xlib/Vyatta/Interface.pm8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm
index b7473dc..432fe33 100755
--- a/lib/Vyatta/Interface.pm
+++ b/lib/Vyatta/Interface.pm
@@ -352,13 +352,7 @@ sub running {
sub description {
my $self = shift;
- open my $ifalias, '<', "/sys/class/net/$self->{name}/ifalias"
- or return;
- my $description = <$ifalias>;
- close $ifalias;
- chomp $description if $description;
-
- return $description;
+ return interface_description($self->{name});
}
1;