Don't catch stderr for vgdisplay commands

Prevent useless messages from poluting the output
This commit is contained in:
Daniel Berteaud 2021-01-13 17:41:55 +01:00
parent 6fbfb70ae0
commit b95cca848c
1 changed files with 2 additions and 2 deletions

View File

@ -180,10 +180,10 @@ sub get_vg_information() {
my $units_arg = '';
$units_arg = " --units $units " if ($units);
if ( -e "/usr/sbin/vgdisplay" ) {
@vginfo = `/usr/sbin/vgdisplay -v $units_arg`;
@vginfo = `/usr/sbin/vgdisplay -v $units_arg 2>/dev/null`;
} else {
if( ! -e "/sbin/vgdisplay" ) { die("LVM utilities not installed in /sbin or /usr/sbin"); }
@vginfo = `/sbin/vgdisplay -v $units_arg`;
@vginfo = `/sbin/vgdisplay -v $units_arg 2>/dev/null`;
}
VGINF: foreach(@vginfo) {