Bug 470928
| Summary: | dhclient-script in dhcp-4.0.0-30 destroys /etc/ntp.conf and /etc/resolv.conf | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Sami Farin <hvtaifwkbgefbaei> |
| Component: | dhcp | Assignee: | Dave Cantrell <dcantrell> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 10 | CC: | dcantrell, sunnyruled13, wwoods |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-12-07 04:15:35 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 471126 | ||
|
Description
Sami Farin
2008-11-10 21:54:56 UTC
I see what's happening here. A change went in to the -24 release to suppress errors from source_config() in instances where ifcfg-DEVICE did not exist, but ${CONFIG} is not the full path to the ifcfg-DEVICE file. Here's the fix:
Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhclient-script,v
retrieving revision 1.3
diff -u -p -r1.3 dhclient-script
--- dhclient-script 1 Oct 2008 22:38:30 -0000 1.3
+++ dhclient-script 10 Nov 2008 22:06:32 -0000
@@ -452,10 +452,7 @@ fi
CONFIG="${interface}"
need_config ${CONFIG}
-
-if [ -f "${CONFIG}" ]; then
- source_config
-fi
+source_config >/dev/null 2>&1
if [ -n "${new_subnet_mask}" ]; then
new_prefix="$(ipcalc -p ${new_ip_address} ${new_subnet_mask} | cut -d '=' -f 2)"
Can you make this change locally to your /sbin/dhclient-script and test it out?
Did not help, unfortunately. root 16124 0.0 0.0 16880 824 ? Ss Nov10 0:00 /sbin/dhclient -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0 [root@safari /sbin]# kill 16124 [root@safari /sbin]# cd /etc [root@safari /etc]# chattr -i ntp.conf resolv.conf [root@safari /etc]# l ntp.conf resolv.conf -rw------- 1 root root 2559 2006-06-16 00:09:25.447898000 +0300 ntp.conf -rw-r--r-- 1 root xuser 22 2008-11-10 23:33:26.026538779 +0200 resolv.conf [root@safari /etc]# /sbin/dhclient -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0& [2] 18386 [root@safari /etc]# l ntp.conf resolv.conf -rw-r--r-- 1 root xuser 2726 2008-11-11 00:14:01.639538809 +0200 ntp.conf -rw-r--r-- 1 root xuser 108 2008-11-11 00:14:01.597539991 +0200 resolv.conf Can you try this patch:
Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhclient-script,v
retrieving revision 1.3
diff -u -p -r1.3 dhclient-script
--- dhclient-script 1 Oct 2008 22:38:30 -0000 1.3
+++ dhclient-script 11 Nov 2008 04:20:53 -0000
@@ -451,10 +451,10 @@ if [ -f /etc/sysconfig/networking/networ
fi
CONFIG="${interface}"
-need_config ${CONFIG}
-
-if [ -f "${CONFIG}" ]; then
- source_config
+if [ -d /etc/sysconfig/network-scripts ]; then
+ cd /etc/sysconfig/network-scripts
+ need_config ${CONFIG}
+ source_config >/dev/null 2>&1
fi
if [ -n "${new_subnet_mask}" ]; then
Now it works, my config files survived! Thanks. Thanks for helping with testing out the patches. I will put this fix in to an update for F-10. The update should be available when F-10 ships. But when I reboot, it still tries to overwrite /etc/ntp.conf. dhcp-4.0.0-32.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update dhcp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/f10/FEDORA-2008-9915 This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping dhcp-4.0.0-32.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. |