qvm-sync-clock: sync dom0 clock only when NTP sync succeeded, even with --force
Otherwise dom0 clock (initially almost ok) may be adjusted to totally invalid timestamp of ClockVM (for example just after resume from S3 sleep).
This commit is contained in:
parent
3f19157d2f
commit
3ece17a8cf
@ -94,7 +94,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
print >> sys.stderr, 'Time sync failed! - Exiting'
|
print >> sys.stderr, 'Time sync failed! - Exiting'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
else:
|
||||||
# Use the date format based on RFC2822 to avoid localisation issues
|
# Use the date format based on RFC2822 to avoid localisation issues
|
||||||
p = clock_vm.run('date -u -Iseconds', verbose=options.verbose,
|
p = clock_vm.run('date -u -Iseconds', verbose=options.verbose,
|
||||||
gui=False, passio_popen=True, ignore_stderr=True)
|
gui=False, passio_popen=True, ignore_stderr=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user