Bug 128357 - ifdown does not restore /etc/resolv.conf on interface shutdown via system-control-network
ifdown does not restore /etc/resolv.conf on interface shutdown via system-con...
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
Blocks: FC5Target
  Show dependency treegraph
Reported: 2004-07-21 22:26 EDT by Keunwoo Lee
Modified: 2014-03-16 22:46 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-05 15:43:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Keunwoo Lee 2004-07-21 22:26:38 EDT
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 tweety.build.redhat.com) 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 
porky.build.redhat.com) 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 
search xxx.xxxx.xxx 
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 11:21:54 EDT
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 15:43:41 EST
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.