From b82e31942013a8e4e16ad604860e7b4174efbf98 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 1 Feb 2012 12:49:33 -0800 Subject: [PATCH] Supress error output from missing tw_cli http://www.virtualmin.com/node/21036 --- smart-status/smart-status-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart-status/smart-status-lib.pl b/smart-status/smart-status-lib.pl index e530e8801..d798224fe 100755 --- a/smart-status/smart-status-lib.pl +++ b/smart-status/smart-status-lib.pl @@ -119,7 +119,7 @@ Returns a list, each element of which is a unit, controller and list of subdisks sub list_3ware_subdisks { local ($ctrl) = @_; -local $out = &backquote_command("tw_cli info $ctrl"); +local $out = &backquote_command("tw_cli info $ctrl 2>/dev/null"); return () if ($?); my @rv; foreach my $l (split(/\r?\n/, $out)) { @@ -144,7 +144,7 @@ Returns a list of 3ware controllers, each of which is just a string like c0 =cut sub list_3ware_controllers { -local $out = &backquote_command("tw_cli show"); +local $out = &backquote_command("tw_cli show 2>/dev/null"); return () if ($?); my @rv; foreach my $l (split(/\r?\n/, $out)) {