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:
Marek Marczykowski-Górecki 2016-02-22 20:56:38 +01:00
parent 3f19157d2f
commit 3ece17a8cf
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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)