From 20334910696b63116b9416a2fd804dce312cd00b Mon Sep 17 00:00:00 2001 From: Andrei Smaliak Date: Wed, 10 Jun 2026 08:44:56 +0400 Subject: [PATCH] time --- stage_env/stage_env_install_no_pulse.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/stage_env/stage_env_install_no_pulse.sh b/stage_env/stage_env_install_no_pulse.sh index d5062d0..71483dd 100644 --- a/stage_env/stage_env_install_no_pulse.sh +++ b/stage_env/stage_env_install_no_pulse.sh @@ -812,13 +812,22 @@ soft_run "dpkg-reconfigure tzdata" 120 /usr/sbin/dpkg-reconfigure -f noninteract # Step 6: NTP (use systemd-timesyncd, remove ntp/ntpd) # ------------------------- step "Time sync: install+enable systemd-timesyncd; remove ntp/ntpd if present" -apt_install_missing systemd-timesyncd +if apt_install_missing systemd-timesyncd; then + log "systemd-timesyncd package ensured" +else + log "WARN: systemd-timesyncd install failed; continuing without blocking stage_env" + echo "[!] WARN: systemd-timesyncd install failed; continuing without it (see $LOG)" +fi systemctl_disable_now_safe ntp systemctl_disable_now_safe ntpd systemctl_mask_safe ntp.service apt_remove_if_installed ntp -systemctl_enable_now_safe systemd-timesyncd -soft_run "timedatectl set-ntp true" 10 /bin/bash -lc 'timedatectl set-ntp true 2>/dev/null || true' +if package_installed systemd-timesyncd; then + systemctl_enable_now_safe systemd-timesyncd + soft_run "timedatectl set-ntp true" 10 /bin/bash -lc 'timedatectl set-ntp true 2>/dev/null || true' +else + log "WARN: systemd-timesyncd is not installed; skipped timedatectl NTP enable" +fi # ------------------------- # Step 7: Production users & hardening vendor user