#
# AUTHOR
# Craig Barratt <cbarratt@users.sourceforge.net>
+# Josh Marshall
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001-2004 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 8 Feb 2004.
+# Version 2.1.0, released 20 Jun 2004.
#
# See http://backuppc.sourceforge.net.
#
print("Error: unable to create output directory $outLoc\n");
exit(1);
}
- if ( $splitSize && -x $splitPath ) {
+ if ( $splitSize > 0 && -x $splitPath ) {
$cmd .= "| $splitPath -b $splitSize - $outLoc/$host.$bkupNum.tar$fileExt.";
$mesg .= ", split to output files $outLoc/$host.$bkupNum.tar$fileExt.*";
} else {
#
my $ret = system($cmd);
if ( $ret ) {
+ print("Executing: $cmd\n");
print("Error: $tarCreate, compress or split failed\n");
exit(1);
}
# ie: not a tape device).
#
if ( -d $outLoc && -x $parPath ) {
- print("Running $parPath to create parity files\n");
- $ret = system("$parPath a -n $parfile $outLoc/$host.$bkupNum.tar$fileExt.par $outLoc/$host.$bkupNum.tar$fileExt.*");
- if ( $ret ) {
- print("Error: $parPath failed\n");
- exit(1);
+ if ( $parfile != 0 ) {
+ print("Running $parPath to create parity files\n");
+ my $parCmd = "$parPath c -r$parfile $outLoc/$host.$bkupNum.tar$fileExt.par2 $outLoc/$host.$bkupNum.tar$fileExt.*";
+ $ret = system($parCmd);
+ if ( $ret ) {
+ print("Executing: $parCmd\n");
+ print("Error: $parPath failed\n");
+ exit(1);
+ }
}
}