diff --git a/dom0/aux-tools/qubes-watch-updates.sh b/dom0/aux-tools/qubes-watch-updates.sh index f1532bc6..ecfda429 100755 --- a/dom0/aux-tools/qubes-watch-updates.sh +++ b/dom0/aux-tools/qubes-watch-updates.sh @@ -58,13 +58,8 @@ while true; do done # At the end synchronize clock + qvm-sync-dom0-clock - # dd is supposed to not allow memory exhaustion - # grep does basic sanity checking - # there seems to be no way to pass output of date +%s.%N to date, - # so we use human-readable format - CURRENT_TIME="$($QREXEC_CLIENT -d $UPDATES_VM 'user:date -u' | dd count=1 2>/dev/null | grep '^[A-Za-z]* [A-Za-z]* [0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] UTC [0-9][0-9][0-9][0-9]$'|head -1)" - if [ -n "$CURRENT_TIME" ] ; then sudo date -u -s "$CURRENT_TIME" ; fi sleep $UPDATES_SLEEP done diff --git a/dom0/qvm-tools/qvm-dom0-upgrade b/dom0/qvm-tools/qvm-dom0-upgrade index 1f496f6a..6cb16922 100755 --- a/dom0/qvm-tools/qvm-dom0-upgrade +++ b/dom0/qvm-tools/qvm-dom0-upgrade @@ -6,6 +6,10 @@ if [ -z "$UPDATEVM" ]; then exit 1 fi +# We should ensure the clocks in Dom0 and UpdateVM are in sync +# becuase otherwise yum might complain about future timestamps +qvm-sync-dom0-clock + echo "Checking for dom0 updates" # Start VM if not running already