#!/bin/sh set -e [ "$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!" #variables cp_get_ifaddr CARNET_IPADDR=$RET cp_get_netaddr CARNET_NETADDR=$RET CARNET_HOSTNAME=`hostname` CARNET_DOMAINNAME=`hostname --domain` CARNET_REV=`echo $CARNET_IPADDR | awk -F. '{ print $3 "." $2 "." $1 ".in-addr.arpa" }'` 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/named.conf.options < /usr/share/doc/bind9-cn/examples/hosts.db < /usr/share/doc/bind9-cn/examples/hosts.rev < /usr/share/doc/bind9-cn/examples/hosts < /usr/share/doc/bind9-cn/examples/resolv.conf < /etc/bind/named.conf.options.$$ cp_mv /etc/bind/named.conf.options.$$ /etc/bind/named.conf.options echo "CN: Removing obsolete query-source directive" rndc reload || echo "CN: Reload didn't work, please check manually" fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0