aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-09-07 20:55:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-09-07 20:55:50 +0200
commit09ea6a0778a0e095f89925396338c72f1881ebfd (patch)
treec3106a3d8731a2fbf5e0171d7edccd6120d64072
parent096da2e8d40f1405ec80da9b0cc401f591fa4f6c (diff)
downloadnetworkmanager-dispatcher-timesyncd-09ea6a0778a0e095f89925396338c72f1881ebfd.tar.gz
networkmanager-dispatcher-timesyncd-09ea6a0778a0e095f89925396338c72f1881ebfd.tar.zst
add a comment to configuration file
-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
;;