From 66f11969cffe3ff605a7f4e887f7e654c52b7499 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Oct 2006 11:14:27 +0000 Subject: [PATCH] fix for Bind Init Script does not create the PID file always, work in progress version --- bind.spec | 6 +++++- named.init | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bind.spec b/bind.spec index 1857155..d14ff34 100644 --- a/bind.spec +++ b/bind.spec @@ -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 - 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 - 30:9.3.3-2 - removed chcon from post script, replaced by restorecon (Bug 202547, comment no. 37) diff --git a/named.init b/named.init index 23f4faa..d5aa418 100755 --- a/named.init +++ b/named.init @@ -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