chrony/SOURCES/chrony.dhclient

26 lines
570 B
Plaintext
Raw Normal View History

2019-08-05 15:07:43 +00:00
#!/bin/bash
SERVERFILE=$SAVEDIR/chrony.servers.$interface
chrony_config() {
2021-10-06 14:04:01 +00:00
# Disable modifications if called from a NM dispatcher script
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2019-08-05 15:07:43 +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-10-06 14:04:01 +00:00
[ -n "$NM_DISPATCHER_ACTION" ] && return 0
2019-08-05 15:07:43 +00:00
if [ -f "$SERVERFILE" ]; then
rm -f "$SERVERFILE"
/usr/libexec/chrony-helper update-daemon || :
fi
}