From 3a404a543ede63a37095ef7d7c16dd725362ac45 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 17 Sep 2008 16:32:13 -0700 Subject: Fix script for bond with no slaves --- scripts/vyatta-show-bonding.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vyatta-show-bonding.pl b/scripts/vyatta-show-bonding.pl index 68e65e2..c3f5b01 100755 --- a/scripts/vyatta-show-bonding.pl +++ b/scripts/vyatta-show-bonding.pl @@ -76,7 +76,8 @@ sub show_brief { $mode =~ s/ [0-9]+$//; my ( $state, $link ) = get_state_link($intf); my $slaves = get_sysfs_value( $intf, "bonding/slaves" ); - printf $format, $intf, $mode, $state, $link, $slaves; + printf $format, $intf, $mode, $state, $link, + $slaves ? $slaves : ''; } } -- cgit v1.2.3