aboutsummaryrefslogtreecommitdiffstats
path: root/dns/bind910/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to 'dns/bind910/pkg-install')
-rw-r--r--dns/bind910/pkg-install26
1 files changed, 26 insertions, 0 deletions
diff --git a/dns/bind910/pkg-install b/dns/bind910/pkg-install
new file mode 100644
index 000000000000..df1fc8ad7639
--- /dev/null
+++ b/dns/bind910/pkg-install
@@ -0,0 +1,26 @@
+#!/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