chrony/SOURCES/chrony.dhclient

26 lines
570 B
Plaintext
Raw Normal View History

2019-05-07 12:12:44 +00:00
#!/bin/bash
SERVERFILE=$SAVEDIR/chrony.servers.$interface
chrony_config() {
2021-11-09 10:08:33 +00:00
# Disable modifications if called from a NM dispatcher script
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2019-11-05 21:27:18 +00:00
rm -f "$SERVERFILE"
2019-05-07 12:12:44 +00:00
if [ "$PEERNTP" != "no" ]; then
for server in $new_ntp_servers; do
2019-11-05 21:27:18 +00:00
echo "$server ${NTPSERVERARGS:-iburst}" >> "$SERVERFILE"
2019-05-07 12:12:44 +00:00
done
/usr/libexec/chrony-helper update-daemon || :
fi
}
chrony_restore() {
2021-11-09 10:08:33 +00:00
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2019-11-05 21:27:18 +00:00
if [ -f "$SERVERFILE" ]; then
rm -f "$SERVERFILE"
2019-05-07 12:12:44 +00:00
/usr/libexec/chrony-helper update-daemon || :
fi
}