freebsd-ports/dns/bind9-devel/pkg-install
Mathieu Arnold 93272c5ded Add a bind9 development version, extracted from their git repository.
Requested by:	many
Sponsored by:	Absolight
2015-11-05 15:01:29 +00:00

32 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