Whitespace cleanup
Signed-off-by: Herman van Rink <rink@initfour.nl>
This commit is contained in:
parent
14ba7e8486
commit
9c9e45ac64
@ -11,9 +11,9 @@ print "HOOK: " . join (' ', @ARGV) . "\n";
|
|||||||
|
|
||||||
my $phase = shift;
|
my $phase = shift;
|
||||||
|
|
||||||
if ($phase eq 'job-start' ||
|
if ($phase eq 'job-start' ||
|
||||||
$phase eq 'job-end' ||
|
$phase eq 'job-end' ||
|
||||||
$phase eq 'job-abort') {
|
$phase eq 'job-abort') {
|
||||||
|
|
||||||
my $dumpdir = $ENV{DUMPDIR};
|
my $dumpdir = $ENV{DUMPDIR};
|
||||||
|
|
||||||
@ -21,12 +21,12 @@ if ($phase eq 'job-start' ||
|
|||||||
|
|
||||||
print "HOOK-ENV: dumpdir=$dumpdir;storeid=$storeid\n";
|
print "HOOK-ENV: dumpdir=$dumpdir;storeid=$storeid\n";
|
||||||
|
|
||||||
# do what you want
|
# do what you want
|
||||||
|
|
||||||
} elsif ($phase eq 'backup-start' ||
|
} elsif ($phase eq 'backup-start' ||
|
||||||
$phase eq 'backup-end' ||
|
$phase eq 'backup-end' ||
|
||||||
$phase eq 'backup-abort' ||
|
$phase eq 'backup-abort' ||
|
||||||
$phase eq 'log-end' ||
|
$phase eq 'log-end' ||
|
||||||
$phase eq 'pre-stop' ||
|
$phase eq 'pre-stop' ||
|
||||||
$phase eq 'pre-restart' ||
|
$phase eq 'pre-restart' ||
|
||||||
$phase eq 'post-restart') {
|
$phase eq 'post-restart') {
|
||||||
@ -47,22 +47,22 @@ if ($phase eq 'job-start' ||
|
|||||||
my $tarfile = $ENV{TARFILE};
|
my $tarfile = $ENV{TARFILE};
|
||||||
|
|
||||||
# logfile is only available in phase 'log-end'
|
# logfile is only available in phase 'log-end'
|
||||||
my $logfile = $ENV{LOGFILE};
|
my $logfile = $ENV{LOGFILE};
|
||||||
|
|
||||||
print "HOOK-ENV: vmtype=$vmtype;dumpdir=$dumpdir;storeid=$storeid;hostname=$hostname;tarfile=$tarfile;logfile=$logfile\n";
|
print "HOOK-ENV: vmtype=$vmtype;dumpdir=$dumpdir;storeid=$storeid;hostname=$hostname;tarfile=$tarfile;logfile=$logfile\n";
|
||||||
|
|
||||||
# example: copy resulting backup file to another host using scp
|
# example: copy resulting backup file to another host using scp
|
||||||
if ($phase eq 'backup-end') {
|
if ($phase eq 'backup-end') {
|
||||||
#system ("scp $tarfile backup-host:/backup-dir") == 0 ||
|
#system ("scp $tarfile backup-host:/backup-dir") == 0 ||
|
||||||
# die "copy tar file to backup-host failed";
|
# die "copy tar file to backup-host failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
# example: copy resulting log file to another host using scp
|
# example: copy resulting log file to another host using scp
|
||||||
if ($phase eq 'log-end') {
|
if ($phase eq 'log-end') {
|
||||||
#system ("scp $logfile backup-host:/backup-dir") == 0 ||
|
#system ("scp $logfile backup-host:/backup-dir") == 0 ||
|
||||||
# die "copy log file to backup-host failed";
|
# die "copy log file to backup-host failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
die "got unknown phase '$phase'";
|
die "got unknown phase '$phase'";
|
||||||
|
Loading…
Reference in New Issue
Block a user