fix: sync Parallels Linux clock · openclaw/openclaw@7e51866
steipete
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -466,7 +466,18 @@ restore_snapshot() {
|
466 | 466 | wait_for_guest_ready || die "guest did not become ready in $VM_NAME" |
467 | 467 | } |
468 | 468 | |
| 469 | +sync_guest_clock() { |
| 470 | +local host_now |
| 471 | + host_now="$(date -u '+%Y-%m-%d %H:%M:%S UTC')" |
| 472 | + guest_exec date -u -s "$host_now" >/dev/null |
| 473 | + guest_exec hwclock --systohc >/dev/null 2>&1 || true |
| 474 | + guest_exec timedatectl set-ntp true >/dev/null 2>&1 || true |
| 475 | + guest_exec systemctl restart systemd-timesyncd >/dev/null 2>&1 || true |
| 476 | + guest_exec date -u |
| 477 | +} |
| 478 | + |
469 | 479 | bootstrap_guest() { |
| 480 | + sync_guest_clock |
470 | 481 | guest_exec apt-get -o Acquire::Check-Date=false update |
471 | 482 | guest_exec apt-get install -y curl ca-certificates |
472 | 483 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。