dabfaa
#!/bin/bash
dabfaa
dabfaa
SERVERFILE=$SAVEDIR/chrony.servers.$interface
dabfaa
dabfaa
chrony_config() {
83af60
	# Disable modifications if called from a NM dispatcher script
83af60
	[ -n "$NM_DISPATCHER_ACTION" ] && return 0
83af60
e07ec3
	rm -f "$SERVERFILE"
dabfaa
	if [ "$PEERNTP" != "no" ]; then
dabfaa
		for server in $new_ntp_servers; do
e07ec3
			echo "$server ${NTPSERVERARGS:-iburst}" >> "$SERVERFILE"
dabfaa
		done
dabfaa
		/usr/libexec/chrony-helper update-daemon || :
dabfaa
	fi
dabfaa
}
dabfaa
dabfaa
chrony_restore() {
83af60
	[ -n "$NM_DISPATCHER_ACTION" ] && return 0
83af60
e07ec3
	if [ -f "$SERVERFILE" ]; then
e07ec3
		rm -f "$SERVERFILE"
dabfaa
		/usr/libexec/chrony-helper update-daemon || :
dabfaa
	fi
dabfaa
}