aboutsummaryrefslogtreecommitdiffstats
path: root/30-timesyncd
diff options
context:
space:
mode:
Diffstat (limited to '30-timesyncd')
-rwxr-xr-x30-timesyncd6
1 files changed, 5 insertions, 1 deletions
diff --git a/30-timesyncd b/30-timesyncd
index 710a3fc..2276cbb 100755
--- a/30-timesyncd
+++ b/30-timesyncd
@@ -7,8 +7,12 @@ case "${STATUS}" in
up|dhcp4-change)
if [ -n "${DHCP4_NTP_SERVERS}" ]; then
mkdir -p /run/systemd/timesyncd.conf.d/
- echo "[Time]" > /run/systemd/timesyncd.conf.d/${INTERFACE}.conf
+
+ echo -e "# generated for interface ${INTERFACE} by networkmanager-dispatcher-timesyncd\n" \
+ > /run/systemd/timesyncd.conf.d/${INTERFACE}.conf
+ echo "[Time]" >> /run/systemd/timesyncd.conf.d/${INTERFACE}.conf
echo "NTP = ${DHCP4_NTP_SERVERS}" >> /run/systemd/timesyncd.conf.d/${INTERFACE}.conf
+
timedatectl set-ntp true
fi
;;