- add a tmpfiles configuration to ensure that /var/run/nslcd is created when /var/run is completely empty at boot (#656643)
This commit is contained in:
parent
b91566aa14
commit
c2236c0beb
2
nslcd.tmpfiles
Normal file
2
nslcd.tmpfiles
Normal file
@ -0,0 +1,2 @@
|
||||
# nslcd needs a directory in /var/run to store its pid file and socket
|
||||
d /var/run/nslcd 0755 nslcd root
|
@ -1,6 +1,6 @@
|
||||
Name: nss-pam-ldapd
|
||||
Version: 0.7.13
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: An nsswitch module which uses directory servers
|
||||
Group: System Environment/Base
|
||||
License: LGPLv2+
|
||||
@ -8,6 +8,7 @@ URL: http://arthurdejong.org/nss-pam-ldapd/
|
||||
Source0: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
|
||||
Source1: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz.sig
|
||||
Source2: nslcd.init
|
||||
Source3: nslcd.tmpfiles
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: openldap-devel, krb5-devel
|
||||
Obsoletes: nss-ldapd < 0.7
|
||||
@ -58,6 +59,8 @@ sed -i -e 's,^uid.*,uid nslcd,g' -e 's,^gid.*,gid ldap,g' \
|
||||
$RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
|
||||
touch -r nslcd.conf $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
|
||||
mkdir -p -m 0755 $RPM_BUILD_ROOT/var/run/nslcd
|
||||
mkdir -p -m 0755 $RPM_BUILD_ROOT/etc/tmpfiles.d
|
||||
install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}.conf
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -69,6 +72,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/%{_lib}/*.so.*
|
||||
%{_mandir}/*/*
|
||||
%attr(0600,root,root) %config(noreplace) /etc/nslcd.conf
|
||||
%attr(0644,root,root) %config(noreplace) /etc/tmpfiles.d/%{name}.conf
|
||||
%attr(0755,root,root) %{_initddir}/nslcd
|
||||
%attr(0755,nslcd,root) /var/run/nslcd
|
||||
%if 0%{?fedora} > 13
|
||||
@ -150,6 +154,10 @@ if grep -q '^gid nslcd' $target ; then
|
||||
sed -i -e 's,^gid nslcd$,# gid nslcd,g' $target
|
||||
fi
|
||||
fi
|
||||
# Create the daemon's /var/run directory if it isn't there.
|
||||
if ! test -d /var/run/nslcd ; then
|
||||
mkdir -p -m 0755 /var/run/nslcd
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
@ -167,6 +175,10 @@ fi
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Tue Mar 1 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-3
|
||||
- add a tmpfiles configuration to ensure that /var/run/nslcd is created when
|
||||
/var/run is completely empty at boot (#656643)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user