summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rwxr-xr-xtest/bbackupd/testfiles/syncallowscript.pl.in33
2 files changed, 35 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 564a9076..8b6221a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,7 +246,8 @@ AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config
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
diff --git a/test/bbackupd/testfiles/syncallowscript.pl.in b/test/bbackupd/testfiles/syncallowscript.pl.in
new file mode 100755
index 00000000..af425e90
--- /dev/null
+++ b/test/bbackupd/testfiles/syncallowscript.pl.in
@@ -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;