mirror of https://github.com/jimsalterjrs/sanoid
only print stderr output of failed listing command with --debug flag
This commit is contained in:
parent
3b18948f29
commit
28ef311ba5
9
syncoid
9
syncoid
|
|
@ -1455,8 +1455,13 @@ sub getsnaps() {
|
|||
$fsescaped = escapeshellparam($fsescaped);
|
||||
}
|
||||
|
||||
my $getsnapcmd = "$rhost $mysudocmd $zfscmd get -Hpd 1 -t snapshot guid,creation $fsescaped |";
|
||||
if ($debug) { print "DEBUG: getting list of snapshots on $fs using $getsnapcmd...\n"; }
|
||||
my $getsnapcmd = "$rhost $mysudocmd $zfscmd get A-Hpd 1 -t snapshot guid,creation $fsescaped";
|
||||
if ($debug) {
|
||||
$getsnapcmd = "$getsnapcmd |";
|
||||
print "DEBUG: getting list of snapshots on $fs using $getsnapcmd...\n";
|
||||
} else {
|
||||
$getsnapcmd = "$getsnapcmd 2>/dev/null |";
|
||||
}
|
||||
open FH, $getsnapcmd;
|
||||
my @rawsnaps = <FH>;
|
||||
close FH or do {
|
||||
|
|
|
|||
Loading…
Reference in New Issue