diff --git a/grml_build/Dockerfile b/grml_build/Dockerfile index 8e232c7..47a852e 100644 --- a/grml_build/Dockerfile +++ b/grml_build/Dockerfile @@ -5,7 +5,7 @@ FROM docker.mgm.sipwise.com/sipwise-bookworm:latest # is updated with the current date. It will force refresh of all # of the base images and things like `apt-get update` won't be using # old cached versions when the Dockerfile is built. -ENV REFRESHED_AT 2022-11-11 +ENV REFRESHED_AT 2022-11-14 # tools for building and testing RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ diff --git a/grml_build/package_config/SIPWISE b/grml_build/package_config/SIPWISE index abbe295..dfdce53 100644 --- a/grml_build/package_config/SIPWISE +++ b/grml_build/package_config/SIPWISE @@ -7,6 +7,7 @@ binutils bridge-utils bsdmainutils buffer +chrony coreutils cpio cpufrequtils diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index e64e49a..ae2bc74 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -725,6 +725,33 @@ display_partition_table() { fi } +enable_ntp() { + echo "Displaying original timedatectl status:" + timedatectl status + + if systemctl cat chrony &>/dev/null ; then + echo "Ensuring chrony service is running" + systemctl start chrony + + echo "Enabling NTP synchronization" + timedatectl set-ntp true || true + elif systemctl cat ntp &>/dev/null ; then + echo "Ensuring ntp service is running" + systemctl start ntp + + echo "Enabling NTP synchronization" + timedatectl set-ntp true || true + else + echo "No ntp service identified, skipping NTP synchronization" + fi + + echo "Disabling RTC for local time" + timedatectl set-local-rtc false + + echo "Displaying new timedatectl status:" + timedatectl status +} + lvm_setup() { local saved_options saved_options="$(set +o)" @@ -1879,6 +1906,9 @@ fi service ssh start >/dev/null & echo "root:sipwise" | chpasswd +# date/time settings, so live system has proper date set +enable_ntp + ## partition disk set_deploy_status "disksetup"