Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 128357 - ifdown does not restore /etc/resolv.conf on interface shutdown via system-control-network
Summary: ifdown does not restore /etc/resolv.conf on interface shutdown via system-con...
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
Reported: 2004-07-22 02:26 UTC by Keunwoo Lee
Modified: 2014-03-17 02:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-03-05 20:43:41 UTC

Attachments (Terms of Use)

Description Keunwoo Lee 2004-07-22 02:26:38 UTC
Description of problem: 
The symptom is that when I bring down a DHCP ethernet interface using 
system-control-network, /etc/resolv.conf.predhclient is not restored 
to /etc/resolv.conf.  This wreaks havoc when I later dial up via 
KPPP, which merely cats the ppp connection's resolv.conf entries onto 
the existing resolv.conf.  Hilarity ensues as my machine attempts to 
connect to my most recent dhcp nameservers via the ppp connection. 
As far as I can tell, there are actually two interrelated bugs here: 
1. My current /sbin/dhclient-script (rpm -qi says it's 3.0.1rc14 
built on does not appear to contain any code 
to restore the /etc/resolv.conf.predhclient file.  It contains code 
to save the old resolv.conf, but I do not see where it restores it. 
2. My current initscripts (rpm -qi says it's 7.55.1 built on does not appear to call the dhclient-script 
to shut down dhclient interfaces; instead it contains the following 
  [ -n "`pidof -x dhclient`" ] && { 
    if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then 
      kill `cat /var/run/dhclient-${DEVICE}.pid` >/dev/null 2>&1 
I don't know the internals of dhclient.  Maybe dhclient traps the 
kill signal and invokes dhclient-script anyway.  But it looks to me 
like it just nukes the dhclient process. 
In any case, dhclient-script is definitely not getting called.  I 
installed a /etc/dhclient-exit-hooks file that does 
  echo "foo">/root/foo 
and this file only gets created when activating an interface, not 
when deactivating it. 
Version-Release number of selected component (if applicable): 
How reproducible: 
Every time. 
Steps to Reproduce: 
1. Run system-control-network and activate a DHCP interface, then 
bring it down again. 
2. cat /etc/resolv.conf 
Actual results: 
/etc/resolv contains the lines 
; generated by /sbin/dhclient-script 
nameserver XXX.XXX.XXX.XXX 
nameserver XXX.XXX.XXX.XXX 
Expected results: 
/etc/resolv.conf should look the way it did before bringing up the 

Comment 1 Matthew Miller 2005-04-26 15:21:54 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 2 Miloslav Trmač 2006-03-05 20:43:41 UTC
This works correctly in rawhide initscripts-8.30-1 and dhclient-3.0.3-26.
Thanks for your report.

Note You need to log in before you can comment on or make changes to this bug.