|
|
@ -79,7 +79,7 @@ sub get_nodes {
|
|
|
|
# Simply write a unix timestamp to a file with our name on it
|
|
|
|
# Simply write a unix timestamp to a file with our name on it
|
|
|
|
sub write_timestamp {
|
|
|
|
sub write_timestamp {
|
|
|
|
my $time = time;
|
|
|
|
my $time = time;
|
|
|
|
open(FILE,"+>$electiondir/$hostname");
|
|
|
|
open(FILE,"+>$electiondir/$hostname") or die "Could not open file: $!";
|
|
|
|
print FILE $time;
|
|
|
|
print FILE $time;
|
|
|
|
close FILE;
|
|
|
|
close FILE;
|
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ sub is_active {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
print "I am active\n";
|
|
|
|
print "I am active\n";
|
|
|
|
my $outfile = "$sharedcrondir/active";
|
|
|
|
my $outfile = "$sharedcrondir/active";
|
|
|
|
open(OUTFILE,"+>$outfile");
|
|
|
|
open(OUTFILE,"+>$outfile") or die "Could not open file: $!";
|
|
|
|
print OUTFILE $hostname;
|
|
|
|
print OUTFILE $hostname;
|
|
|
|
close OUTFILE;
|
|
|
|
close OUTFILE;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -142,7 +142,7 @@ sub comment_out {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
close INFILE;
|
|
|
|
close INFILE;
|
|
|
|
open(OUTFILE,"+>$outfile");
|
|
|
|
open(OUTFILE,"+>$outfile") or die "Could not open file: $!";
|
|
|
|
print OUTFILE $content;
|
|
|
|
print OUTFILE $content;
|
|
|
|
close OUTFILE;
|
|
|
|
close OUTFILE;
|
|
|
|
|
|
|
|
|
|
|
@ -159,7 +159,7 @@ sub uncomment {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
close INFILE;
|
|
|
|
close INFILE;
|
|
|
|
open(OUTFILE,"+>$outfile");
|
|
|
|
open(OUTFILE,"+>$outfile") or die "Could not open file: $!";
|
|
|
|
print OUTFILE $content;
|
|
|
|
print OUTFILE $content;
|
|
|
|
close OUTFILE;
|
|
|
|
close OUTFILE;
|
|
|
|
|
|
|
|
|
|
|
|