1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00
freebsd-ports/dns/bind98/pkg-install
2014-01-06 21:39:08 +00:00

27 lines
511 B
Bash

#!/bin/sh
if [ "$2" = 'POST-INSTALL' ]
then
/bin/mkdir -p /var/named${PKG_PREFIX}/etc
fi
for DIR in ${PKG_PREFIX}/etc /var/named${PKG_PREFIX}/etc; do
for FILE in named.conf rndc.key; do
if [ "$2" = 'POST-INSTALL' ]
then
/bin/ln -sf /etc/namedb/${FILE} ${DIR}/${FILE}
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 > /dev/null 2>&1 || :
fi
exit 0