Fixes for 2.1.0beta1:
[BackupPC.git] / bin / BackupPC_archiveHost
index 34a6e48..598347d 100755 (executable)
 #
 # 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
@@ -37,7 +38,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0beta0, released 20 Mar 2004.
+# Version 2.1.0beta1, released 9 Apr 2004.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -125,10 +126,12 @@ if ( $ret ) {
 # 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");
+        $ret = system("$parPath c -r$parfile $outLoc/$host.$bkupNum.tar$fileExt.par2 $outLoc/$host.$bkupNum.tar$fileExt.*");
+        if ( $ret ) {
+            print("Error: $parPath failed\n");
+            exit(1);
+        }
     }
 }