Do not resstart ypbind on dhcp renew if nis domain or nis servers
haven't changed Resolves: rhbz#1301708
This commit is contained in:
parent
3bc9fb9d13
commit
5e336ad690
18
nis.sh
18
nis.sh
@ -52,38 +52,34 @@ nis_config() {
|
||||
if [ -n "${new_nis_domain}" ]; then
|
||||
domainname "${new_nis_domain}"
|
||||
save_config_file
|
||||
let contents=0
|
||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||
fix_context ${CONF}
|
||||
|
||||
if [ -n "${new_nis_servers}" ]; then
|
||||
for i in ${new_nis_servers} ; do
|
||||
echo "domain ${new_nis_domain} server ${i}" >> ${CONF}
|
||||
let contents=contents+1
|
||||
done
|
||||
else
|
||||
echo "domain ${new_nis_domain} broadcast" >> ${CONF}
|
||||
let contents=contents+1
|
||||
fi
|
||||
|
||||
if [ ${contents} -gt 0 ]; then
|
||||
service ypbind condrestart >/dev/null 2>&1
|
||||
fi
|
||||
elif [ -n "${new_nis_servers}" ]; then
|
||||
save_config_file
|
||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||
fix_context ${CONF}
|
||||
let contents=0
|
||||
|
||||
for i in ${new_nis_servers} ; do
|
||||
echo "ypserver ${i}" >> ${CONF}
|
||||
let contents=contents+1
|
||||
done
|
||||
|
||||
if [ $contents -gt 0 ]; then
|
||||
service ypbind condrestart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# dimainname or servers changed, restart ypbind
|
||||
if [ "${old_nis_domain}" != "${new_nis_domain}" ] \
|
||||
|| [ "${old_nis_servers}" != "${new_nis_servers}" ]
|
||||
then
|
||||
service ypbind condrestart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain
|
||||
Name: ypbind
|
||||
Epoch: 3
|
||||
Version: 1.38
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source0: http://www.linux-nis.org/download/ypbind-mt/ypbind-mt-%{version}.tar.bz2
|
||||
@ -99,6 +99,11 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
|
||||
%doc README NEWS COPYING
|
||||
|
||||
%changelog
|
||||
* Mon Jan 25 2016 Matej Muzila <mmuzila@redhat.com> 3:1.38-4
|
||||
- Do not resstart ypbind on dhcp renew if nis domain or nis servers
|
||||
haven't changed
|
||||
Resolves: rhbz#1301708
|
||||
|
||||
* Mon Nov 16 2015 Matej Muzila <mmuzila@redhat.com> 3:1.38-3
|
||||
- Load ypbind.service before nss-user-lookup.target
|
||||
Resolves: rhbz#1282440
|
||||
|
Loading…
Reference in New Issue
Block a user