diff options
Diffstat (limited to 'scripts/vyatta-show-interfaces.pl')
-rwxr-xr-x | scripts/vyatta-show-interfaces.pl | 13 |
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 { |