X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=1acb14a922610701bc6c8832270323b6bd059e74;hb=76d50a78077de1ffb53239078e0aa2da384b4f74;hp=eeb706826aea2fdf4d243b3658a42f58256fe98a;hpb=5bf5ece162242b434df89eb4fbe859a78eec8501;p=ntp-cn.git diff --git a/debian/postinst b/debian/postinst index eeb7068..1acb14a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,6 +1,7 @@ #!/bin/sh [ "$1" = "configure" ] || exit 0 +[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx konfiguriraj() { if [ -f /etc/ntp.conf ]; then @@ -13,9 +14,12 @@ konfiguriraj() { cp /usr/share/doc/ntp-cn/ntp.conf.tmpl /etc - cat > /etc/default/ntp-servers </dev/null && sleep 1 || break - done - invoke-rc.d ntp start + invoke-rc.d ntp restart else - /etc/init.d/ntp stop - for i in 1 2 3 4 5 6 7 8 9 0; do - pgrep -u root -f /usr/sbin/ntpd >/dev/null && sleep 1 || break - done - /etc/init.d/ntp start + /etc/init.d/ntp restart fi fi