From f35dbbee7d25a91f62f22bc3a77bde8d6b75b99b Mon Sep 17 00:00:00 2001 From: smckown Date: Thu, 10 Jan 2008 22:59:07 +0000 Subject: [PATCH] The velist file now goes into the log subdirectory and its name is derived from the script's basename. --- BackupPC_ovz | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BackupPC_ovz b/BackupPC_ovz index 7106749..830de2c 100755 --- a/BackupPC_ovz +++ b/BackupPC_ovz @@ -22,6 +22,7 @@ my @velist = (); my $pidfile = "/tmp/".basename($0).".pid"; my $vzsnap = 'vzsnap'; # Mount point and lv names. Mount is relative to /. my $snapsize = '1g'; +my $velistFile = $ENV{HOME}."/log/".basename($0).".velist"; sub cmdExecOrEval { @@ -67,8 +68,7 @@ sub refreshConfig() { # Write the VEs on all HNs to a config file on the BackupPC server for # later use. - open my $out, ">/etc/backuppc/vzlist_bpc" || - die "Cannot write to /etc/backuppc/vzlist_bpc"; + open my $out, ">$velistFile" || die "Cannot write to $velistFile"; foreach my $hn (@HNS) { open my $fh, "ssh -l root $hn vzlist -a |" || die "Can run remote vzlist command"; @@ -100,8 +100,8 @@ sub refreshConfig() # For use on the BackupPC server. sub loadVeList() { - open my $fh, ") { chomp; -- 2.39.2