3 [ "$1" = "configure" ] || exit 0
4 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
7 if [ -f /etc/ntp.conf ]; then
8 cp -p /etc/ntp.conf /etc/ntp.conf.dpkg-old
11 if [ -f /etc/default/ntp-servers ]; then
12 cp -p /etc/default/ntp-servers /etc/default/ntp-servers.dpkg-old
15 cp /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc
18 . /usr/share/carnet-tools/functions.sh
20 cp_check_and_sed 'NTPSERVERS' \
21 "s/^.*NTPSERVERS.*/NTPSERVERS=\"zg1.ntp.carnet.hr ri.ntp.carnet.hr zg2.ntp.carnet.hr st.ntp.carnet.hr os.ntp.carnet.hr 127.127.1.0\"/g" \
22 /etc/default/ntpdate || true
25 if [ -f /usr/share/doc/ntp-cn/ntp.conf.tmpl -a -f /etc/ntp.conf ]; then
26 if ! cmp -s /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc/ntp.conf; then
32 if [ -x /etc/init.d/ntp ]; then
33 if [ -x /usr/sbin/invoke-rc.d ]; then
34 invoke-rc.d ntp restart
36 /etc/init.d/ntp restart