summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-04-28 17:32:33 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-04-28 17:32:33 -0500
commit87f35906a41656dc27c1b40a89c6bb78a98b7fc9 (patch)
tree5300b2572d8c9427adf9d67e4cee932d734f3a79
parentfe531878873b93522b2f80779c85a425506bde74 (diff)
downloadvyatta-op-87f35906a41656dc27c1b40a89c6bb78a98b7fc9.tar.gz
vyatta-op-87f35906a41656dc27c1b40a89c6bb78a98b7fc9.zip
Fix accidental merge of show interfaces script, reverting to previous behavior
-rwxr-xr-xscripts/vyatta-show-interfaces.pl13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl
index 86545c4..34a97b3 100755
--- a/scripts/vyatta-show-interfaces.pl
+++ b/scripts/vyatta-show-interfaces.pl
@@ -236,10 +236,8 @@ sub run_show_intf {
sub run_show_intf_brief {
my @intfs = @_;
- my $format = "%-13s %-11s %-6s %-47s\n";
- my $format2 = "%-1s %-40s\n";
- printf($format, "Interface","State","Link","Description");
- printf($format, "---------","-----","----","-----------");
+ my $format = "%-12s %-18s %-11s %-6s %-29s\n";
+ printf($format, "Interface","IP Address","State","Link","Description");
foreach my $intf (@intfs) {
next if ($intf =~ /gre0/);
next if ($intf =~ /sit0/);
@@ -247,14 +245,13 @@ sub run_show_intf_brief {
my ($state, $link) = get_state_link($intf);
my $description = get_intf_description($intf);
if (scalar(@ip_addr) == 0) {
- printf($format, $intf, $state, $link, $description);
+ printf($format, $intf, "-", $state, $link, $description);
} else {
- printf($format, $intf, $state, $link, $description);
foreach my $ip (@ip_addr) {
- printf($format2,'', "$ip");
+ printf($format, $intf, $ip, $state, $link, $description);
}
}
- }
+ }
}
sub run_show_counters {