447 |
%pre |
%pre |
448 |
%_pre_useradd named /var/lib/named /bin/false |
%_pre_useradd named /var/lib/named /bin/false |
449 |
|
|
|
# check if bind is chrooted and try to restore it |
|
|
if [ -x %{_sbindir}/bind-chroot.sh ]; then |
|
|
ROOTDIR="/var/lib/named-chroot" |
|
|
[ -f /etc/sysconfig/named ] && . /etc/sysconfig/named |
|
|
if [ -d $ROOTDIR -a ! -d /var/lib/named ]; then |
|
|
echo "old chroot found at $ROOTDIR, copying to /var/lib/named" |
|
|
cp -rp $ROOTDIR /var/lib/named |
|
|
chown -R named:named /var/lib/named |
|
|
fi |
|
|
if grep -q "$ROOTDIR" /etc/sysconfig/syslog; then |
|
|
if [ -f /var/lock/subsys/named ]; then |
|
|
service named stop > /dev/null 2>/dev/null || : |
|
|
fi |
|
|
%{_sbindir}/bind-chroot.sh --unchroot > /dev/null 2>/dev/null || : |
|
|
fi |
|
|
if [ -f /var/lock/subsys/syslog ]; then |
|
|
service syslog restart > /dev/null 2>/dev/null || : |
|
|
fi |
|
|
fi |
|
|
|
|
450 |
DATE=`date +%%Y%%m%%d%%j%%S` |
DATE=`date +%%Y%%m%%d%%j%%S` |
451 |
for f in named.conf rndc.conf rndc.key; do |
for f in named.conf rndc.conf rndc.key; do |
452 |
# move away files to prepare for softlinks |
# move away files to prepare for softlinks |