Commit d6654a12 authored by Tails developers's avatar Tails developers

htpdate: write success file even when not within {min,max}adjust.

Otherwise htpdate will not "succeed" when the time diff is 0 (i.e.
the clock was already correct) so the success file cannot be used
as an indicator that the system time now is correct, which arguably
is its most important purpose.
parent 639025fb
......@@ -241,12 +241,14 @@ sub adjustDate {
error "An error occured setting the time\n@output";
}
close($fd);
open my $res_h, '>>', $res_file or die "Cannot open res file $res_file: $!";
print $res_h "$diff\n";
close $res_h;
$> = getpwnam($opt_u) if $opt_u;
}
}
$> = 0 if $opt_u;
open my $res_h, '>>', $res_file or die "Cannot open res file $res_file: $!";
print $res_h "$diff\n";
close $res_h;
$> = getpwnam($opt_u) if $opt_u;
}
my @urls = parseCommandLine();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment