Prva verzija za buster.
[bind9-cn.git] / debian / postinst
index 1a86e14..ca7f6bf 100755 (executable)
@@ -1,37 +1,15 @@
 #!/bin/sh
-# postinst script for bind9-cn
-#
-# see: dh_installdeb(1)
 
 set -e
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
-case "$1" in
-    configure|reconfigure)
-      # continue below
-    ;;
-
-    *)
-        exit 0
-    ;;
-esac
-
-# import CN-functions
+[ "$1" = "configure" ] || exit 0
+[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
+
+# Load CARNET Tools
 . /usr/share/carnet-tools/functions.sh
 
 echo "CN: Making sample configurations in /usr/share/doc/bind9-cn/examples"
-echo "CN: Make sure you change them appropriately *before* running Bind9 service!"
+echo "CN: Make sure you change them appropriately *before* running bind9 service!"
 
 #variables
 cp_get_ifaddr
@@ -44,7 +22,7 @@ CARNET_REV=`echo $CARNET_IPADDR | awk -F. '{ print $3 "." $2 "." $1 ".in-addr.ar
 SERNO=`date +%Y%m%d01`
 BROJ=`echo $CARNET_IPADDR | cut -d. -f4`
 
-echo "CN: Generating Bind9 examples in /usr/share/doc/bind9-cn/examples"
+echo "CN: Generating bind9 examples in /usr/share/doc/bind9-cn/examples"
 
 # make example named.conf.local
 cat > /usr/share/doc/bind9-cn/examples/named.conf.local <<EOF