Bug 446631 - NetworkManager does not run dhclient-exit-hooks script
Summary: NetworkManager does not run dhclient-exit-hooks script
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 9
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-05-15 14:05 UTC by Tom Horsley
Modified: 2014-06-09 11:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-14 15:14:13 UTC
Type: ---

Attachments (Terms of Use)

Description Tom Horsley 2008-05-15 14:05:51 UTC
Description of problem:

The traditional way to provide information which cannot be provided by
DHCP (specifically in my case additional DNS domain names in search path)
has been by writing an /etc/dhclient-exit-hooks script which can be used
to edit the /etc/resolv.conf file after it is created by DHCP. This script
is no longer being run when NetworkManager creates resolv.conf

Version-Release number of selected component (if applicable):


How reproducible:

Every time I boot.

Steps to Reproduce:
1. Boot system, observe NetworkManager generated resolv.conf does not
   have the changed dhclient-exit-hooks would have made.
Actual results:

see above

Expected results:

augmented search path in resolv.conf

Additional info:

I'd be happy to learn the "new way" to achieve the same thing
dhclient-exit-hooks did, but on the other hand, I'd really wonder
why there would need to be a "new way" other than obsessive OCD
on the part of developers. How hard is it to just run the dadgum
script if it exists?

Comment 1 Todd J Martin 2008-05-18 22:51:47 UTC
NetworkManager provides its own hooks into dhclient so that it can do its thing.
 You can get NetworkManager to call your script though.  NetworkManager runs all
scripts that are in /etc/NetworkManager/dispatcher.d.  There should be at least
one script in there to show you how things work. 

Comment 2 Mike Loseke 2008-07-10 18:51:02 UTC
Scripts in /etc/NetworkManager/dispatcher.d/ do work, but they don't fully
handle the sorts of things the dhclient-script and friends did.  It's certainly
less featureful.

For example, when dhclient does a renew, NetworkManager does not run any script
in /etc/NetworkManager/dispatcher.d/.  Those only seem to be run when
NetworkManager changes state on a device using either "up" or "down". 
NetworkManager's actions after the renew causes some other services to have to
rediscover the interface:

Jul 10 01:48:22 laptop dhclient: DHCPREQUEST on wlan0 to port 67
Jul 10 01:48:22 laptop dhclient: DHCPACK from
Jul 10 01:48:22 laptop dhclient: bound to -- renewal in 42559 seconds.
Jul 10 01:48:22 laptop NetworkManager: <info>  DHCP: device wlan0 state changed
bound -> renew
Jul 10 01:48:22 laptop NetworkManager: <info>    address
Jul 10 01:48:22 laptop NetworkManager: <info>    netmask
Jul 10 01:48:22 laptop NetworkManager: <info>    gateway
Jul 10 01:48:22 laptop NetworkManager: <info>    nameserver ''
Jul 10 01:48:22 laptop avahi-daemon[2579]: Withdrawing address record for on wlan0.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Leaving mDNS multicast group on
interface wlan0.IPv4 with address
Jul 10 01:48:22 laptop avahi-daemon[2579]: Interface wlan0.IPv4 no longer
relevant for mDNS.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Joining mDNS multicast group on
interface wlan0.IPv4 with address
Jul 10 01:48:22 laptop avahi-daemon[2579]: New relevant interface wlan0.IPv4 for
Jul 10 01:48:22 laptop avahi-daemon[2579]: Registering new address record for on wlan0.IPv4.
Jul 10 01:48:23 laptop NetworkManager: <info>  Policy set (wlan0) as default
device for routing and DNS.

I run openvpn as a service, outside of NetworkManager.  Using the normal
dhclient-script hooks, I can detect this action and restart the openvpn service
when it happens.  The /usr/libexec/nm-dhcp-client.action script NetworkManager
runs from dhclient doesn't appear to be able to handle the same idea of hooks. 
Without a cronjob watching things, or modifying NetworkManager's init script to
use the normal dhclient-script, I have to manually restart openvpn everytime
DHCP renews.  It tends to be less than transparent.

Should this replacement for dhclient-script read and handle the same hooks files
that dhclient-script itself uses, or should NetworkManager itself not make
changes to an interface like this when a simple renew happens?  Ideally,
functionality replaced should not be a reduction.  I'd like to see the hooks work.

Comment 3 Niels Haase 2009-04-08 20:11:44 UTC
Reporter, are you still running Fedora 9, or have you upgraded to Fedora 10 or
Rawhide? In either case, can you let us know whether the issue is still happening, and give the current version of the kernel and NM packages you're
using. Thank you.

Fedora Bugzappers volunteer triage team

Comment 4 Bug Zapper 2009-06-10 00:51:34 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 5 Bug Zapper 2009-07-14 15:14:13 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Tom Horsley 2014-06-09 11:16:11 UTC
Nothing like stoopid automation.

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