From 99da6a7477f3ecd453e3bac33770cd386a495387 Mon Sep 17 00:00:00 2001
From: Zeljko Boros <Zeljko.Boros@carnet.hr>
Date: Tue, 18 Aug 2020 15:49:01 +0200
Subject: [PATCH] Ovisnost o init-system-helpers

---
 debian/changelog |    4 +++-
 debian/control   |    5 +++--
 debian/postinst  |    8 +-------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 70b049f..fd981be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 ntp-cn (2:4.2.8.p12+cn10u1) stable; urgency=low
 
   * Prva inačica za CARNET Debian 10 (buster)
-  * Dodana opcija iburst 
+  * Dodana opcija iburst
+  * Dodana ovisnost o 'init-system-helpers' zbog /usr/sbin/invoke-rc.d
+  * Modificiran postinst, vjerujemo u 'invoke-rc.d'
 
  -- Zeljko Boros <Zeljko.Boros@CARNet.hr>  Tue, 18 Aug 2020 15:16:43 +0200
 
diff --git a/debian/control b/debian/control
index d098f6f..7289844 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Standards-Version: 3.9.8
 Package: ntp-cn
 Architecture: all
 Depends: ntp (>= 1:4.2.8p12+dfsg-4), ntpdate (>= 1:4.2.8p12+dfsg-4), lockfile-progs,
- carnet-tools-cn, ${misc:Depends}
+ carnet-tools-cn (>= 3.2.2), init-system-helpers (>= 1.48), ${misc:Depends}
 Description: Network Time Protocol: poslužitelj i alati
  NTP (Network Time Protocol) se rabi za sinhronizaciju satova na poslužiteljima
- preko interneta ili pomoću vlastitog hardverskog prijamnika: GPS, DCF-77, NIST...
+ preko interneta ili pomoću vlastitog hardverskog prijamnika, kao što su: 
+ GPS, DCF-77, NIST i drugi
diff --git a/debian/postinst b/debian/postinst
index 592bb90..5acabc4 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -31,12 +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#
-- 
1.7.10.4