5 [ "$1" = "configure" ] || exit 0
6 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
9 if [ -f /etc/ntp.conf ]; then
10 cp -p /etc/ntp.conf /etc/ntp.conf.dpkg-old
13 if [ -f /etc/default/ntp-servers ]; then
14 cp -p /etc/default/ntp-servers /etc/default/ntp-servers.dpkg-old
17 cp /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc/ntp.conf
20 . /usr/share/carnet-tools/functions.sh
22 cp_check_and_sed 'NTPSERVERS' \
23 "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" \
24 /etc/default/ntpdate || true
27 if [ -f /usr/share/doc/ntp-cn/ntp.conf.tmpl -a -f /etc/ntp.conf ]; then
28 if ! cmp -s /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc/ntp.conf; then
34 if [ -x /etc/init.d/ntp ]; then
35 if [ -x /usr/sbin/invoke-rc.d ]; then
36 invoke-rc.d ntp restart
38 /etc/init.d/ntp restart