[Box Backup-commit] COMMIT r1073 - in box/chris/merge: . test/bbackupd/testfiles

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Mon Oct 16 20:28:43 BST 2006


Author: chris
Date: 2006-10-16 20:28:43 +0100 (Mon, 16 Oct 2006)
New Revision: 1073

Added:
   box/chris/merge/test/bbackupd/testfiles/syncallowscript.pl.in
Modified:
   box/chris/merge/configure.ac
Log:
Add test/bbackupd/testfiles/syncallowscript.pl to the list of Perl files
auto-generated with substitutions. (refs #3)


Modified: box/chris/merge/configure.ac
===================================================================
--- box/chris/merge/configure.ac	2006-10-16 19:26:51 UTC (rev 1072)
+++ box/chris/merge/configure.ac	2006-10-16 19:28:43 UTC (rev 1073)
@@ -246,7 +246,8 @@
                    test/bbackupd/testfiles/bbackupd.conf
                    test/bbackupd/testfiles/extcheck1.pl
                    test/bbackupd/testfiles/extcheck2.pl
-                   test/bbackupd/testfiles/notifyscript.pl])
+                   test/bbackupd/testfiles/notifyscript.pl
+                   test/bbackupd/testfiles/syncallowscript.pl])
 # TODO: Need to do contrib/cygwin/install-cygwin-service.pl but location varies
 AC_OUTPUT
 

Copied: box/chris/merge/test/bbackupd/testfiles/syncallowscript.pl.in (from rev 1048, box/chris/general/test/bbackupd/testfiles/syncallowscript.pl.in)
===================================================================
--- box/chris/merge/test/bbackupd/testfiles/syncallowscript.pl.in	                        (rev 0)
+++ box/chris/merge/test/bbackupd/testfiles/syncallowscript.pl.in	2006-10-16 19:28:43 UTC (rev 1073)
@@ -0,0 +1,33 @@
+#!@PERL@
+
+use strict;
+use warnings;
+
+my $control_file = 'testfiles/syncallowscript.control';
+if (! -r $control_file)
+{
+	print "now\n";
+	exit 0;
+}
+
+my $control_state;
+open CONTROL, "< $control_file" or die "$control_file: $!";
+$control_state = <CONTROL>;
+defined $control_state or die "$control_file: read failed: $!";
+close CONTROL;
+
+my $marker_file_root = 'testfiles/syncallowscript.notifyran.';
+my $n = 1;
+my $marker_file;
+
+while($marker_file = $marker_file_root.$n and -e $marker_file)
+{
+	$n ++;
+}
+
+open FL,'>'.$marker_file or die "$marker_file: $!";
+print FL localtime();
+close FL;
+
+print $control_state;
+exit 0;




More information about the Boxbackup-commit mailing list