Upgrade to ISC bind-9.2.4 (final version)
This commit is contained in:
parent
affce457be
commit
efcb9cc161
18
bind.spec
18
bind.spec
|
@ -151,18 +151,15 @@ safe_replace /etc/rndc.key "%{prefix}/etc/rndc.key" root named 644 '';
|
||||||
r=$?;
|
r=$?;
|
||||||
if /usr/bin/test "$r" -eq 2; then
|
if /usr/bin/test "$r" -eq 2; then
|
||||||
/bin/rm -f /etc/rndc.key
|
/bin/rm -f /etc/rndc.key
|
||||||
echo 'key "rndckey" {
|
echo -e 'key "rndckey" {\nalgorithm hmac-md5;\nsecret "'`/usr/sbin/dns-keygen`'"\n};' > /etc/rndc.key;
|
||||||
algorithm hmac-md5;
|
|
||||||
secret "'`/usr/sbin/dns-keygen`'"
|
|
||||||
};' > /etc/rndc.key;
|
|
||||||
safe_replace /etc/rndc.key "%{prefix}/etc/rndc.key" root named 644 '';
|
safe_replace /etc/rndc.key "%{prefix}/etc/rndc.key" root named 644 '';
|
||||||
fi;
|
fi;
|
||||||
|
default_ndc='include "/etc/rndc.key";'
|
||||||
|
if [ -f /etc/named.custom ]; then
|
||||||
|
default_ndc='include "/etc/rndc.key";\ninclude "/etc/named.custom";'
|
||||||
safe_replace /etc/named.custom "%{prefix}/etc/named.custom" root named 644 '' || :;
|
safe_replace /etc/named.custom "%{prefix}/etc/named.custom" root named 644 '' || :;
|
||||||
if /usr/bin/test "$?" -eq "0"; then
|
fi
|
||||||
safe_replace /etc/named.conf "%{prefix}/etc/named.conf" root named 644 'include "/etc/named.custom";\ninclude "/etc/rndc.key";'
|
safe_replace /etc/named.conf "%{prefix}/etc/named.conf" root named 644 "$default_ndc"
|
||||||
else
|
|
||||||
safe_replace /etc/named.conf "%{prefix}/etc/named.conf" root named 644 'include "/etc/rndc.key";'
|
|
||||||
fi;
|
|
||||||
/usr/bin/find /var/named -type f | /bin/egrep -v /var/named/chroot | while read f;
|
/usr/bin/find /var/named -type f | /bin/egrep -v /var/named/chroot | while read f;
|
||||||
do
|
do
|
||||||
d=`/usr/bin/dirname $f`;
|
d=`/usr/bin/dirname $f`;
|
||||||
|
@ -195,7 +192,7 @@ if [ "$1" = "0" ]; then
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
if test -r /etc/sysconfig/named && grep -q '^ROOTDIR=' /etc/sysconfig/named; then
|
if test -r /etc/sysconfig/named && grep -q '^ROOTDIR=' /etc/sysconfig/named; then
|
||||||
grep -v ROOTDIR="%{prefix}" /etc/sysconfig/named > /tmp/named
|
grep -v '^ROOTDIR='%{prefix} /etc/sysconfig/named > /tmp/named
|
||||||
mv -f /tmp/named /etc/sysconfig/named
|
mv -f /tmp/named /etc/sysconfig/named
|
||||||
fi
|
fi
|
||||||
if /etc/init.d/named condrestart; then
|
if /etc/init.d/named condrestart; then
|
||||||
|
@ -205,7 +202,6 @@ fi
|
||||||
|
|
||||||
%triggerpostun -n bind-chroot -- bind-chroot
|
%triggerpostun -n bind-chroot -- bind-chroot
|
||||||
# Fix mess left by bind-chroot-9.2.2's %preun (bug 131803)
|
# Fix mess left by bind-chroot-9.2.2's %preun (bug 131803)
|
||||||
# (or by RPM not passing [ $1 -gt 0 ] to bind-chroot-9.2.4-10_EL3 during upgrade ?!?!)
|
|
||||||
if [ "$1" -gt 0 ]; then
|
if [ "$1" -gt 0 ]; then
|
||||||
if test -r /etc/sysconfig/named && grep -q '^ROOTDIR=' /etc/sysconfig/named; then
|
if test -r /etc/sysconfig/named && grep -q '^ROOTDIR=' /etc/sysconfig/named; then
|
||||||
:;
|
:;
|
||||||
|
|
Loading…
Reference in New Issue