summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-clock/scripts/ntp-sync.sh
diff options
context:
space:
mode:
authorSimon Rettberg2023-01-24 15:33:38 +0100
committerSimon Rettberg2023-01-24 15:33:38 +0100
commit6eaaa711ad729b3cc244f0c97e4f901172db84f0 (patch)
tree54ac3c1f959c87be3d04e1dfcbf446e6ab3468ca /modules.d/slx-clock/scripts/ntp-sync.sh
parentAccidentally enabled NFS (diff)
downloadsystemd-init-6eaaa711ad729b3cc244f0c97e4f901172db84f0.tar.gz
systemd-init-6eaaa711ad729b3cc244f0c97e4f901172db84f0.tar.xz
systemd-init-6eaaa711ad729b3cc244f0c97e4f901172db84f0.zip
[slx-clock] Use ntpd, as ntpdate uses ntpdig, which is written in python
We don't want python in our init, it's bloated enough already...
Diffstat (limited to 'modules.d/slx-clock/scripts/ntp-sync.sh')
-rwxr-xr-xmodules.d/slx-clock/scripts/ntp-sync.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules.d/slx-clock/scripts/ntp-sync.sh b/modules.d/slx-clock/scripts/ntp-sync.sh
index d9c0e7bc..81b4b5a3 100755
--- a/modules.d/slx-clock/scripts/ntp-sync.sh
+++ b/modules.d/slx-clock/scripts/ntp-sync.sh
@@ -12,7 +12,7 @@ ntp_sync() {
done
local SUCCESS=
for SERVER in $SLX_DHCP_NTP; do
- if ntpdate -u "$SERVER"; then
+ if timeout 3 ntpd -q -n -p "$SERVER"; then
echo "Successfully queried $SERVER for time."
if [ "x$SLX_BIOS_CLOCK" = "xlocal" ]; then
usleep 100000