freebsd-ports/dns/bind99/pkg-install
Mathieu Arnold 43e54a5f1b Update dns/bind99 to 9.9.7 and dns/bind910 to 9.10.2.
On 8 and 9, use the same configuration path than on 10+, ${PREFIX}/etc/namedb/.

Sponsored by:	Absolight
2015-02-26 02:03:15 +00:00

33 lines
683 B
Bash

#!/bin/sh
# ex:sw=8 sts=8
if [ "$2" = 'POST-INSTALL' ]
then
/bin/mkdir -p /var/named${PKG_PREFIX}/etc/namedb
fi
for DIR in ${PKG_PREFIX}/etc/namedb /var/named${PKG_PREFIX}/etc/namedb; do
for FILE in named.conf rndc.conf rndc.key; do
if [ "$2" = 'POST-INSTALL' ]
then
if [ -e ${PKG_PREFIX}/etc/${FILE} ]
then
/bin/cp -a ${PKG_PREFIX}/etc/${FILE} ${DIR}/${FILE}
else
/bin/ln -sf /etc/namedb/${FILE} ${DIR}/${FILE}
fi
fi
if [ "$2" = 'POST-DEINSTALL' ]
then
[ -L ${DIR}/${FILE} ] && rm -f ${DIR}/${FILE}
fi
done
done
if [ "$2" = 'POST-DEINSTALL' ]
then
cd /var/named && /bin/rmdir -p ./${PKG_PREFIX}/etc/namedb > /dev/null 2>&1 || :
fi
exit 0