mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
27 lines
511 B
Bash
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
|