X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=2b226374cdbb630170e9fe1720eb64477062a585;hb=684a2828b853422b1700e47139a1d75a872f646d;hp=4b0b4c8b51ed2ae771552051185b0c495c442081;hpb=cfa22dd36fb4be0f50a2587c3558cc44288d28f2;p=bind9-cn.git diff --git a/debian/postinst b/debian/postinst index 4b0b4c8..2b22637 100755 --- a/debian/postinst +++ b/debian/postinst @@ -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: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# 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 read them and apply *before* running Bind9 service!" +echo "CN: Make sure you change them appropriately *before* running Bind9 service!" #variables cp_get_ifaddr @@ -44,6 +22,8 @@ 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" + # make example named.conf.local cat > /usr/share/doc/bind9-cn/examples/named.conf.local < /usr/share/doc/bind9-cn/examples/hosts.rev < /usr/share/doc/bind9-cn/examples/resolv.conf <