- added tmpfiles.d support (#656550)

- removed old PID checking in initscript
This commit is contained in:
Jan Görig 2010-11-29 14:22:41 +01:00
parent 516bc441f8
commit 79e5ad687f
3 changed files with 12 additions and 8 deletions

View File

@ -22,7 +22,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind Name: bind
License: ISC License: ISC
Version: 9.7.2 Version: 9.7.2
Release: 6.%{PATCHVER}%{?dist} Release: 7.%{PATCHVER}%{?dist}
Epoch: 32 Epoch: 32
Url: http://www.isc.org/products/BIND/ Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -43,6 +43,7 @@ Source31: ldap2zone.1
Source32: named-sdb.8 Source32: named-sdb.8
Source33: zonetodb.1 Source33: zonetodb.1
Source34: zone2sqlite.1 Source34: zone2sqlite.1
Source35: bind.tmpfiles.d
# Common patches # Common patches
Patch5: bind-nonexec.patch Patch5: bind-nonexec.patch
@ -78,6 +79,7 @@ Patch94: bind95-rh461409.patch
# #
Requires: mktemp Requires: mktemp
Requires: systemd-units
Requires(post): grep, chkconfig Requires(post): grep, chkconfig
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(preun):chkconfig Requires(preun):chkconfig
@ -458,6 +460,9 @@ for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.int
done done
:; :;
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d
install -m 644 %{SOURCE35} ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/named.conf
%pre %pre
if [ "$1" -eq 1 ]; then if [ "$1" -eq 1 ]; then
/usr/sbin/groupadd -g %{bind_gid} -f -r named >/dev/null 2>&1 || :; /usr/sbin/groupadd -g %{bind_gid} -f -r named >/dev/null 2>&1 || :;
@ -601,6 +606,7 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sysconfig/named %config(noreplace) %{_sysconfdir}/sysconfig/named
%config(noreplace) %attr(-,root,named) %{_sysconfdir}/named.iscdlv.key %config(noreplace) %attr(-,root,named) %{_sysconfdir}/named.iscdlv.key
%config(noreplace) %attr(-,root,named) %{_sysconfdir}/named.root.key %config(noreplace) %attr(-,root,named) %{_sysconfdir}/named.root.key
%{_sysconfdir}/tmpfiles.d/named.conf
%{_sysconfdir}/rc.d/init.d/named %{_sysconfdir}/rc.d/init.d/named
%{_sysconfdir}/NetworkManager/dispatcher.d/13-named %{_sysconfdir}/NetworkManager/dispatcher.d/13-named
%{_sbindir}/arpaname %{_sbindir}/arpaname
@ -758,6 +764,10 @@ rm -rf ${RPM_BUILD_ROOT}
%endif %endif
%changelog %changelog
* Mon Nov 29 2010 Jan Görig <jgorig redhat com> 32:9.7.2-7.P2
- added tmpfiles.d support (#656550)
- removed old PID checking in initscript
* Mon Nov 08 2010 Adam Tkac <atkac redhat com> 32:9.7.2-6.P2 * Mon Nov 08 2010 Adam Tkac <atkac redhat com> 32:9.7.2-6.P2
- don't emit various informational messages by default (#645544) - don't emit various informational messages by default (#645544)

1
bind.tmpfiles.d Normal file
View File

@ -0,0 +1 @@
d /var/run/named 0755 named named -

View File

@ -143,13 +143,6 @@ start()
ln -s $ROOTDIR/var/run/named/"$named".pid /var/run/"$named".pid; ln -s $ROOTDIR/var/run/named/"$named".pid /var/run/"$named".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;
fi;
fi;
else else
named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`"; named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";
echo echo