Made two INFO prints mutable

Added a quiet check for two non-controllable INFO prints

Fixes: #182

Signed-off-by: Martin van Wingerden <martin@martinvw.nl>
This commit is contained in:
Martin van Wingerden 2017-12-29 20:02:01 +01:00
parent f6519c0aea
commit 742db32e68
1 changed files with 2 additions and 2 deletions

4
sanoid
View File

@ -235,7 +235,7 @@ sub prune_snapshots {
foreach my $snap( @prunesnaps ){
if ($args{'verbose'}) { print "INFO: pruning $snap ... \n"; }
if (iszfsbusy($path)) {
print "INFO: deferring pruning of $snap - $path is currently in zfs send or receive.\n";
if ($args{'verbose'}) { print "INFO: deferring pruning of $snap - $path is currently in zfs send or receive.\n"; }
} else {
if (! $args{'readonly'}) { system($zfs, "destroy",$snap) == 0 or warn "could not remove $snap : $?"; }
}
@ -244,7 +244,7 @@ sub prune_snapshots {
$forcecacheupdate = 1;
%snaps = getsnaps(%config,$cacheTTL,$forcecacheupdate);
} else {
print "INFO: deferring snapshot pruning - valid pruning lock held by other sanoid process.\n";
if ($args{'verbose'}) { print "INFO: deferring snapshot pruning - valid pruning lock held by other sanoid process.\n"; }
}
}
}