From 5c0ee53e9863658a25aedba532bf1a5a76b8b0de Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Mon, 9 Dec 2013 09:09:46 -0700 Subject: [PATCH] BackupPC_ovz: report entry to more functions in debug --- BackupPC_ovz | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BackupPC_ovz b/BackupPC_ovz index c6ef4bf..38e888a 100755 --- a/BackupPC_ovz +++ b/BackupPC_ovz @@ -88,6 +88,8 @@ sub refreshConfig() # Write the VEs on all HNs to a config file on the BackupPC server for # later use. my @HNS = (); + + print $dbgf ": refreshConfig\n"; open my $cfg, "<$hnlistFile" || mydie "Cannot read $hnlistFile"; while (<$cfg>) { chomp; @@ -273,6 +275,7 @@ sub printVeEntry($) sub delSnapshot($) { my ($ve) = @_; + print $dbgf ": delSnapshot\n"; mydie "No VE record for delSnapshot" if (!defined($ve)); #print "delSnapshot: doing nothing for now\n"; @@ -426,6 +429,7 @@ sub restoreConfigs($) sub checkRunningClient() { + print $dbgf ": checkRunningClient, vzsnap=$vzsnap\n"; mydie "A backup or restore operation are already in progress" if (Proc::PID::File->running({ dir => '/tmp', verify => 1 })); @@ -463,6 +467,7 @@ sub runPing() my $host = shift(@ARGV); my $cmd = join(' ', @ARGV); + print $dbgf ": runPing host=$host, cmd=$cmd\n"; # Find $host in the list of VEs loadVeList(); my $hostname = gethostbyaddr(gethostbyname($host), AF_INET); @@ -482,6 +487,7 @@ sub runClient($) { my ($restore) = @_; + print $dbgf ": runClient restore=$restore\n"; checkRunningClient(); my $veid = shift(@ARGV); @@ -517,6 +523,8 @@ sub runClient($) # Remove snapshot, we're done delSnapshot($ve); + print $dbgf ": runClient complete\n"; + # Pass the return code back #exit $ret; FIXME: currently, cmdSystemOrEval doesn't return a retcode. exit 0; @@ -534,8 +542,9 @@ sub runClient($) sub runServer($) { my ($restore) = @_; - my $host = shift(@ARGV); + + print $dbgf ": runServer restore=$restore, host=$host\n"; mydie "Hostname argument required" if (!defined($host)); mydie "No command to execute after hostname" if ($#ARGV < 0); -- 2.39.2