20 lines
372 B
Bash
Executable File
20 lines
372 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "${PM_FUNCTIONS}"
|
|
|
|
sync_qubes_vms_wallclock()
|
|
{
|
|
# Sync all VMs based on dom0 clock
|
|
DATE=$(date)
|
|
echo
|
|
echo "Syncing VMs clock to: $DATE"
|
|
qvm-run --all --exclude=`qvm-get-clockvm` -u root "date -s \"$DATE\""
|
|
# Then try to sync from the network
|
|
/usr/bin/qvm-sync-clock &
|
|
}
|
|
|
|
case "$1" in
|
|
thaw|resume) sync_qubes_vms_wallclock ;;
|
|
*) exit 0 ;;
|
|
esac
|