- Do not override manually configured NTP servers in /etc/ntp.conf
(#274761)
This commit is contained in:
parent
c637bc589d
commit
0cf0761895
@ -13,7 +13,7 @@
|
||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
||||
Name: dhcp
|
||||
Version: 3.0.6
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 12
|
||||
License: ISC
|
||||
Group: System Environment/Daemons
|
||||
@ -431,6 +431,9 @@ fi
|
||||
%{_libdir}/libdhcp4client.a
|
||||
|
||||
%changelog
|
||||
* Tue Sep 04 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.6-4
|
||||
- Do not override manually configured NTP servers in /etc/ntp.conf (#274761)
|
||||
|
||||
* Wed Aug 15 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.6-3
|
||||
- Remove the -x switch enabling extended new option info. If given to
|
||||
dhclient now, it's ignored.
|
||||
|
11
linux
11
linux
@ -410,15 +410,10 @@ function dhconfig()
|
||||
:
|
||||
elif [ -n "$new_ntp_servers" ] && [ -e /etc/ntp.conf ]; then
|
||||
save_previous /etc/ntp.conf
|
||||
/bin/egrep -v '(^[\ \ ]*(server|fudge))|(generated by /sbin/dhclient-script)'< /etc/ntp.conf.predhclient > /etc/ntp.conf
|
||||
echo '# servers generated by /sbin/dhclient-script' >> /etc/ntp.conf
|
||||
localClocks=(`/bin/egrep '^[\ \ ]*server[\ \ ]+127\.127' /etc/ntp.conf.predhclient | while read s addr rest; do echo $addr; done`)
|
||||
localClockFudge="`/bin/egrep '^[\ \ ]*fudge[\ \ ]+127\.127' /etc/ntp.conf.predhclient`";
|
||||
for s in $new_ntp_servers ${localClocks[@]};
|
||||
do
|
||||
echo 'server '$s >> /etc/ntp.conf;
|
||||
/bin/egrep -v '^server .* # added by /sbin/dhclient-script$'< /etc/ntp.conf.predhclient > /etc/ntp.conf
|
||||
for s in $new_ntp_servers; do
|
||||
echo "server $s # added by /sbin/dhclient-script" >> /etc/ntp.conf;
|
||||
done
|
||||
echo "$localClockFudge" >> /etc/ntp.conf;
|
||||
if [ -x /usr/bin/diff ] && /usr/bin/diff -q /etc/ntp.conf /etc/ntp.conf.predhclient >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user