From 75e7f54128e0f43fd424a60859b2d6a0fb0eea8c Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Mon, 17 Nov 2014 10:24:37 -0500 Subject: [PATCH] bugfix: remove references to global $debug (not implemented yet) and $rhost (not applicable in sanoid) --- sanoid | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sanoid b/sanoid index 5d6ce1d..fc8f853 100755 --- a/sanoid +++ b/sanoid @@ -955,19 +955,21 @@ sub iszfsbusy { # check to see if ZFS filesystem passed in as argument currently has a zfs send or zfs receive process referencing it. # return true if busy (currently being sent or received), return false if not. + my $debug; #REMOVE THIS LATER when global $debug is actually implemented in sanoid! + my $fs = shift; my $pscmd = '/bin/ps'; - if ($debug) { print "DEBUG: checking to see if $fs on $rhost is already in zfs receive using $pscmd axo args= ...\n"; } + if ($debug) { print "DEBUG: checking to see if $fs on is already in zfs receive using $pscmd axo args= ...\n"; } open PL, "$pscmd axo args= |"; my @processes = ; close PL; foreach my $process (@processes) { - if ($debug) { print "DEBUG: checking process $process...\n"; } + # if ($debug) { print "DEBUG: checking process $process...\n"; } if ($process =~ /zfs *(send|receive).*$fs/) { # there's already a zfs send/receive process for our target filesystem - return true - if ($debug) { print "DEBUG: process $process matches target $fs!\n"; } + # if ($debug) { print "DEBUG: process $process matches target $fs!\n"; } return 1; } }