bind: Adapt chroot-bind for Buster
This commit is contained in:
parent
8993242b2c
commit
c71521acc3
1 changed files with 16 additions and 6 deletions
|
@ -3,7 +3,7 @@
|
|||
# Gregory Colpart <reg@debian.org>
|
||||
# chroot (or re-chroot) script for bind9
|
||||
|
||||
# tested on Debian Wheezy/Jessie/Stretch
|
||||
# tested on Debian Wheezy/Jessie/Stretch/Buster
|
||||
# Exec this script after `(apt-get|aptitude|apt) install bind9`
|
||||
# and after *each* bind9 upgrade
|
||||
|
||||
|
@ -24,8 +24,8 @@ mkdir -p /var/chroot-bind
|
|||
mkdir -p /var/chroot-bind/bin /var/chroot-bind/dev /var/chroot-bind/etc \
|
||||
/var/chroot-bind/lib /var/chroot-bind/usr/lib \
|
||||
/var/chroot-bind/usr/sbin /var/chroot-bind/var/cache/bind \
|
||||
/var/chroot-bind/var/log /var/chroot-bind/var/run/named/ \
|
||||
/var/chroot-bind/run/named/
|
||||
/var/chroot-bind/var/log /var/chroot-bind/var/run/named \
|
||||
/var/chroot-bind/run/named /var/chroot-bind/usr/share/dns
|
||||
|
||||
# for conf
|
||||
if [ ! -h "/etc/bind" ]; then
|
||||
|
@ -33,6 +33,11 @@ if [ ! -h "/etc/bind" ]; then
|
|||
ln -s /var/chroot-bind/etc/bind/ /etc/bind
|
||||
fi
|
||||
|
||||
# for dns
|
||||
if [ -d "/usr/share/dns" ]; then
|
||||
cp -a /usr/share/dns/* /var/chroot-bind/usr/share/dns/
|
||||
fi
|
||||
|
||||
# for logs
|
||||
touch /var/chroot-bind/var/log/bind.log
|
||||
if [ ! -h "/var/log/bind.log" ]; then
|
||||
|
@ -60,11 +65,16 @@ fi
|
|||
#chmod 666 /var/chroot-bind/dev/{null,random}
|
||||
|
||||
# essential libs
|
||||
for i in `ldd $(which named) | grep -v linux-vdso.so.1 | cut -d">" -f2 | cut -d"(" -f1` \
|
||||
/usr/lib/x86_64-linux-gnu/openssl-1.0.*/engines/libgost.so ; do
|
||||
install -D $i /var/chroot-bind/${i##/}
|
||||
for i in `ldd $(which named) | grep -v linux-vdso.so.1 | cut -d">" -f2 | cut -d"(" -f1`
|
||||
do install -D $i /var/chroot-bind/${i##/}
|
||||
done
|
||||
|
||||
if [ ls /usr/lib/x86_64-linux-gnu/openssl-1.0.*/engines/libgost.so 1>/dev/null 2>&1 ]; then
|
||||
for i in /usr/lib/x86_64-linux-gnu/openssl-1.0.*/engines/libgost.so
|
||||
do install -D $i /var/chroot-bind/${i##/}
|
||||
done
|
||||
fi
|
||||
|
||||
# essential (hum, bash is required ??)
|
||||
#cp /bin/bash /var/chroot-bind/bin/
|
||||
cp /usr/sbin/named /var/chroot-bind/usr/sbin/
|
||||
|
|
Loading…
Reference in a new issue