fix for Bind Init Script does not create the PID file always, work in

progress version
This commit is contained in:
Martin Stransky 2006-10-05 11:14:27 +00:00
parent 5cb2d02ad3
commit 66f11969cf
2 changed files with 15 additions and 1 deletions

View File

@ -18,7 +18,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: BSD-like
Version: 9.3.3
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 30
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-root
@ -782,6 +782,10 @@ rm -rf ${RPM_BUILD_ROOT}
:;
%changelog
* Thu Oct 5 2006 Martin Stransky <stransky@redhat.com> - 30:9.3.3-3
- added fix from #209400 - Bind Init Script does not create
the PID file always, created by Jeff Means
* Mon Oct 2 2006 Martin Stransky <stransky@redhat.com> - 30:9.3.3-2
- removed chcon from post script, replaced by restorecon
(Bug 202547, comment no. 37)

View File

@ -162,6 +162,16 @@ start() {
ln -s $ROOTDIR/var/run/named/named.pid /var/run/named_sdb.pid;
fi;
fi;
if [ -n "`/sbin/pidof -o %PPID $named`" ]; then
# Verify that named actually started (JM 2006-10-04)
if [ ! -e $ROOTDIR/var/run/named/named.pid ]; then
# If there is not a file containing the PID of the now running named daemon then create it (JM 2006-10-04)
echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named.pid;
if [ "$named" = "named_sdb" ]; then
echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named_sdb.pid;
fi;
fi;
fi;
else
named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";
echo