diff options
author | Jonathan Bauer | 2019-11-05 16:26:45 +0100 |
---|---|---|
committer | Jonathan Bauer | 2019-11-05 16:26:45 +0100 |
commit | f7edc034321d7dd4bec4b4ce09318c87b2824aa9 (patch) | |
tree | c0fedec82bc92dbc1cd80d5bb84fb85f30d2bf07 /builder/modules.d/slx-clock/scripts/configure-timesyncd.sh | |
parent | [slx-dmsetup] revert data_block_size to 256 (diff) | |
download | systemd-init-f7edc034321d7dd4bec4b4ce09318c87b2824aa9.tar.gz systemd-init-f7edc034321d7dd4bec4b4ce09318c87b2824aa9.tar.xz systemd-init-f7edc034321d7dd4bec4b4ce09318c87b2824aa9.zip |
[slx-clock] support SLX_NTP_SERVER in stage4
Diffstat (limited to 'builder/modules.d/slx-clock/scripts/configure-timesyncd.sh')
-rw-r--r-- | builder/modules.d/slx-clock/scripts/configure-timesyncd.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 |