echo "restrict ${x} nomodify notrap noquery" >> "${cf}"
echo "server ${x}" >> "${cf}"
done
- if [ ! -e /etc/ntp.conf ]; then
- false
- elif type cmp >/dev/null 2>&1; then
- cmp -s /etc/ntp.conf "${cf}"
- elif type diff >/dev/null 2>&1; then
- diff -q /etc/ntp.conf "${cf}" >/dev/null
- else
- false
- fi
- if [ $? = 0 ]; then
- rm -f "${cf}"
- else
- save_conf /etc/ntp.conf
- mv -f "${cf}" /etc/ntp.conf
- [ -n "${ntpd_restart_cmd}" ] && ${ntpd_restart_cmd}
- fi
+ save_conf /etc/ntp.conf
+ mv -f "${cf}" /etc/ntp.conf
+ [ -n "${ntpd_restart_cmd}" ] && ${ntpd_restart_cmd}
}
restore_ntp_conf()