3
system("/etc/init.d/atd stop") if -x "/etc/init.d/atd";
5
$seqfile='/var/spool/cron/atjobs/.SEQ';
7
$re='\*[^\s]*\s+(\*\s+){3}(\*|\d+)\s+root\s+atrun\s';
9
open(OI,"$etc/crontab") || exit 0;
10
open(NI,">$etc/crontab.prermnew") || die "Creating new crontab: $!\n";
12
if (m/^$re/o) { $mod++; next; }
13
print NI || die "Writing new crontab: $!\n";
15
close(NI) || die "Closing new crontab: $!\n";
17
rename("$etc/crontab.prermnew","$etc/crontab") ||
18
die "Installing new crontab: $!\n"; #
20
unlink("$etc/crontab.prermnew") || die "Aborting new crontab: $!\n";
23
# Save the old sequence number, if it's there...
24
rename($seqfile, $seqfile . "-old");