From f7edc034321d7dd4bec4b4ce09318c87b2824aa9 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 5 Nov 2019 16:26:45 +0100 Subject: [slx-clock] support SLX_NTP_SERVER in stage4 --- builder/modules.d/slx-clock/scripts/configure-timesyncd.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 builder/modules.d/slx-clock/scripts/configure-timesyncd.sh (limited to 'builder/modules.d/slx-clock/scripts/configure-timesyncd.sh') diff --git a/builder/modules.d/slx-clock/scripts/configure-timesyncd.sh b/builder/modules.d/slx-clock/scripts/configure-timesyncd.sh new file mode 100644 index 00000000..af1148eb --- /dev/null +++ b/builder/modules.d/slx-clock/scripts/configure-timesyncd.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +. /etc/openslx + +if [ -n "$SLX_NTP_SERVER" ]; then + tsdir="${NEWROOT}/etc/systemd/timesyncd.conf.d" + mkdir -p "$tsdir" + ( + echo "[Time]" + echo "NTP=$SLX_NTP_SERVER" + ) > "${tsdir}/slx-ntp.conf" +fi -- cgit v1.2.3-55-g7522