Blame SOURCES/chrony.dhclient

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