43e54a5f1b
On 8 and 9, use the same configuration path than on 10+, ${PREFIX}/etc/namedb/. Sponsored by: Absolight
33 lines
683 B
Bash
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
|