# 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;
sub delSnapshot($)
{
my ($ve) = @_;
+ print $dbgf ": delSnapshot\n";
mydie "No VE record for delSnapshot" if (!defined($ve));
#print "delSnapshot: doing nothing for now\n";
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 }));
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);
{
my ($restore) = @_;
+ print $dbgf ": runClient restore=$restore\n";
checkRunningClient();
my $veid = shift(@ARGV);
# 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;
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);