1
0
Fork 0
chrony/debian/tests/dynamically-add-source
Daniel Baumann 79ad1c5afd
Adding debian version 4.6.1-3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 09:10:31 +02:00

27 lines
691 B
Bash

#!/bin/sh
# Make sure that NTP sources from /etc/chrony/sources.d are usable.
set -e
. debian/tests/helper-functions
server_addr="192.0.2.1"
printf "Preparing chronyd configuration: "
__no_system_clock_control
__restart_chronyd && __test_ok || __test_skip
printf "Adding a dummy server to the list of NTP sources: "
printf "server $server_addr\n" > /etc/chrony/sources.d/dummy-server.sources && __test_ok || __test_fail
printf "Reloading NTP sources: "
__reload_sources
printf "Checking for dummy server availability: "
__check_sources "$server_addr"
printf "Checking for dummy server availability after restarting chronyd: "
__restart_chronyd
__check_sources "$server_addr"
exit 0