File: syncallowscript.pl.in

package info (click to toggle)
boxbackup 0.11~rc2-7squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,384 kB
  • ctags: 3,378
  • sloc: cpp: 40,561; sh: 17,410; perl: 3,398; xml: 3,098; makefile: 102
file content (33 lines) | stat: -rwxr-xr-x 624 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!@TARGET_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;