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
16
nis.sh
16
nis.sh
@ -52,37 +52,33 @@ nis_config() {
|
|||||||
if [ -n "${new_nis_domain}" ]; then
|
if [ -n "${new_nis_domain}" ]; then
|
||||||
domainname "${new_nis_domain}"
|
domainname "${new_nis_domain}"
|
||||||
save_config_file
|
save_config_file
|
||||||
let contents=0
|
|
||||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||||
fix_context ${CONF}
|
fix_context ${CONF}
|
||||||
|
|
||||||
if [ -n "${new_nis_servers}" ]; then
|
if [ -n "${new_nis_servers}" ]; then
|
||||||
for i in ${new_nis_servers} ; do
|
for i in ${new_nis_servers} ; do
|
||||||
echo "domain ${new_nis_domain} server ${i}" >> ${CONF}
|
echo "domain ${new_nis_domain} server ${i}" >> ${CONF}
|
||||||
let contents=contents+1
|
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "domain ${new_nis_domain} broadcast" >> ${CONF}
|
echo "domain ${new_nis_domain} broadcast" >> ${CONF}
|
||||||
let contents=contents+1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${contents} -gt 0 ]; then
|
|
||||||
service ypbind condrestart >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
elif [ -n "${new_nis_servers}" ]; then
|
elif [ -n "${new_nis_servers}" ]; then
|
||||||
save_config_file
|
save_config_file
|
||||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||||
fix_context ${CONF}
|
fix_context ${CONF}
|
||||||
let contents=0
|
|
||||||
|
|
||||||
for i in ${new_nis_servers} ; do
|
for i in ${new_nis_servers} ; do
|
||||||
echo "ypserver ${i}" >> ${CONF}
|
echo "ypserver ${i}" >> ${CONF}
|
||||||
let contents=contents+1
|
|
||||||
done
|
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain
|
|||||||
Name: ypbind
|
Name: ypbind
|
||||||
Epoch: 3
|
Epoch: 3
|
||||||
Version: 1.38
|
Version: 1.38
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: http://www.linux-nis.org/download/ypbind-mt/ypbind-mt-%{version}.tar.bz2
|
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
|
%doc README NEWS COPYING
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Nov 16 2015 Matej Muzila <mmuzila@redhat.com> 3:1.38-3
|
||||||
- Load ypbind.service before nss-user-lookup.target
|
- Load ypbind.service before nss-user-lookup.target
|
||||||
Resolves: rhbz#1282440
|
Resolves: rhbz#1282440
|
||||||
|
Loading…
Reference in New Issue
Block a user