X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=debian%2Fpostinst;h=5acabc42e1f36e2ac60723e05035cc21e98a7a24;hb=HEAD;hp=0f3ecb64d98c3c32c4f46105520190d8b774ae98;hpb=403aa9307d0c48a6575915ba137f37efd7ff1e5e;p=ntp-cn.git diff --git a/debian/postinst b/debian/postinst index 0f3ecb6..5acabc4 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,5 +1,7 @@ #!/bin/sh +set -e + [ "$1" = "configure" ] || exit 0 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx @@ -12,14 +14,14 @@ konfiguriraj() { cp -p /etc/default/ntp-servers /etc/default/ntp-servers.dpkg-old fi - cp /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc + cp /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc/ntp.conf # Load CARNet Tools . /usr/share/carnet-tools/functions.sh cp_check_and_sed 'NTPSERVERS' \ "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" \ - /etc/default/ntpservers || true + /etc/default/ntpdate || true } if [ -f /usr/share/doc/ntp-cn/ntp.conf.tmpl -a -f /etc/ntp.conf ]; then @@ -29,10 +31,6 @@ if [ -f /usr/share/doc/ntp-cn/ntp.conf.tmpl -a -f /etc/ntp.conf ]; then fi # restartaj sve -if [ -x /etc/init.d/ntp ]; then - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d ntp restart - else - /etc/init.d/ntp restart - fi -fi +invoke-rc.d ntp restart + +#DEBHELPER#