2013-03-16 18:52:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
sync_qubes_vms_wallclock()
|
|
|
|
{
|
2016-02-22 19:59:46 +00:00
|
|
|
# Sync all VMs (based on dom0 clock if network time sync fails)
|
|
|
|
/usr/bin/qvm-sync-clock --force &
|
2013-03-16 18:52:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
thaw|resume) sync_qubes_vms_wallclock ;;
|
|
|
|
# Kill qvm-sync-clock (if running) to not desync time after resume
|
|
|
|
suspend|hibernate)
|
|
|
|
killall qvm-sync-clock 2> /dev/null
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
*) exit 0 ;;
|
|
|
|
esac
|