core-admin/dom0/pm-utils/01qubes-sync-vms-clock
Joanna Rutkowska 1574c84d66 dom0: pm-utils: 01qubes-sync-vms-clock: run qvm-sync-dom0-clock before syncing clocks on other VMs (#433)
... instead of just $(date), which caused problems when Dom0 clock got
desynced somehow.
2012-01-30 11:00:41 +01:00

18 lines
276 B
Bash
Executable File

#!/bin/sh
. "${PM_FUNCTIONS}"
sync_qubes_vms_wallclock()
{
/usr/bin/qvm-sync-dom0-clock
DATE=$(date)
echo
echo "Syncing VMs clock to: $DATE"
qvm-run --all -u root "date -s \"$DATE\""
}
case "$1" in
thaw|resume) sync_qubes_vms_wallclock ;;
*) exit 0 ;;
esac