diff options
author | Carlo Lanmdeter <clandmeter@gmail> | 2009-02-23 07:25:48 +0000 |
---|---|---|
committer | Carlo Lanmdeter <clandmeter@gmail> | 2009-02-23 07:25:48 +0000 |
commit | 81f67abfd166773bcd32fee4847d172a353d3470 (patch) | |
tree | 055c28a6ed5f1caa176be96f58b3a454b2d9a9e5 /extra/bind | |
parent | c59bfb5f16a44fe9facdf9ae575e604c0f1953f6 (diff) | |
download | aports-81f67abfd166773bcd32fee4847d172a353d3470.tar.bz2 aports-81f67abfd166773bcd32fee4847d172a353d3470.tar.xz |
extra/bind: added missing install file
Diffstat (limited to 'extra/bind')
-rw-r--r-- | extra/bind/APKBUILD | 8 | ||||
-rw-r--r-- | extra/bind/bind.install | 34 |
2 files changed, 39 insertions, 3 deletions
diff --git a/extra/bind/APKBUILD b/extra/bind/APKBUILD index 301f7af6..88868190 100644 --- a/extra/bind/APKBUILD +++ b/extra/bind/APKBUILD @@ -8,7 +8,7 @@ url="http://www.isc.org" license="as-is" depends= makedepends="openssl-dev" -install= +install=$pkgname.install subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-tools" source="http://ftp.isc.org/isc/bind9/9.6.0-P1/bind-9.6.0-P1.tar.gz bind.so_bsdcompat.patch @@ -18,7 +18,8 @@ $pkgname.conf $pkgname.127.zone $pkgname.localhost.zone $pkgname.envd -$pkgname.named.ca" +$pkgname.named.ca +$pkgname.install" build() { cd "$srcdir/bind-9.6.0-P1" @@ -91,4 +92,5 @@ be5fd752bdbd59385f2a559d603098d5 bind.conf a7455b009b7fccd74ac6f6eaa6902a00 bind.127.zone c3220168fabfb31a25e8c3a545545e34 bind.localhost.zone 42b5ed5adcee33cf40531d7955412b21 bind.envd -a94e29ac677846f3d4d618c50b7d34f1 bind.named.ca" +a94e29ac677846f3d4d618c50b7d34f1 bind.named.ca +8449d77a1bc4cf4010589ed8ecbea39a bind.install" diff --git a/extra/bind/bind.install b/extra/bind/bind.install new file mode 100644 index 00000000..e3e4d4a2 --- /dev/null +++ b/extra/bind/bind.install @@ -0,0 +1,34 @@ +#!/bin/sh + +case "$1" in + pre_install) + adduser -h /etc/bind -s /bin/false -D named 2>/dev/null + ;; + post_install) + CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' $ROOT/etc/conf.d/named 2>/dev/null` + [ -z "$CHROOT" ] && CHROOT=/chroot/dns + if [ -d "$CHROOT" ] ; then + echo "$CHROOT already exist. Will not set up chroot" + exit 0 + fi + + # Set up the chroot + mkdir -m 700 -p ${CHROOT} + for i in dev etc var/run/named ; do + mkdir -p "${CHROOT}/$i" + done + mkdir -p "$ROOT/var/run/named" + chown -R named:named "${CHROOT}/var/run/named" + chown -R named:named "$ROOT/var/run/named" + cp -R "$ROOT/etc/bind" "${CHROOT}/etc/" + cp /etc/TZ ${CHROOT}/etc/TZ + #chown named:named ${CHROOT}/etc/bind/rndc.key + cp -R /var/bind "${CHROOT}/var/" + chown -R named:named "${CHROOT}/var/" + mknod "${CHROOT}/dev/zero" c 1 5 + mknod "${CHROOT}/dev/random" c 1 8 + chmod 666 "${CHROOT}/dev/random" "${CHROOT}/dev/zero" + chown named:named "${CHROOT}" +esac +exit 0 + |