chrony/SOURCES/chrony.dhclient

26 lines
570 B
Plaintext
Raw Normal View History

2020-12-17 16:37:00 +00:00
#!/bin/bash
SERVERFILE=$SAVEDIR/chrony.servers.$interface
chrony_config() {
2021-06-24 04:20:39 +00:00
# Disable modifications if called from a NM dispatcher script
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2020-12-17 16:37:00 +00:00
rm -f "$SERVERFILE"
if [ "$PEERNTP" != "no" ]; then
for server in $new_ntp_servers; do
echo "$server ${NTPSERVERARGS:-iburst}" >> "$SERVERFILE"
done
/usr/libexec/chrony-helper update-daemon || :
fi
}
chrony_restore() {
2021-06-24 04:20:39 +00:00
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2020-12-17 16:37:00 +00:00
if [ -f "$SERVERFILE" ]; then
rm -f "$SERVERFILE"
/usr/libexec/chrony-helper update-daemon || :
fi
}