After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605579 - if-down.d should be dispatched before interface goes down (phase is "pre-down")
if-down.d should be dispatched before interface goes down (phase is "pre-down")
Status: RESOLVED DUPLICATE of bug 387832
Product: NetworkManager
Classification: Platform
Component: general
0.7.x
Other Linux
: Normal critical
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2009-12-28 01:31 UTC by hedges
Modified: 2010-01-20 22:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description hedges 2009-12-28 01:31:48 UTC
nm_device_state_changed() in src/nm-device.c waits until the interface goes down to call nm_utils_call_dispatcher("down",...).  

As a result, scripts in /etc/network/if-down.d do not have access to the network when they run.  (Try putting a script in the if-down.d directory that runs "logger 'NM DEBUG' `ifconfig $IFACE`" and you will see in the syslog that the interface is down.)

This is incorrect, because it does not conform to the behavior of ifupdown, and because many packages install scripts in if-down.d that expect the network to be available.  (For instance, I might want to install a script that sends my log-off time to a remote server, ships out logs of what I've been doing, etc.)

I tried changing nm-device.c to put the "down" dispatcher call just after caching the activation request, but that did not help - the interface is still down when the scripts run.

if-post-down.d is supposed to be for running the "post-down" phase.

Tons of other people and packages have depended on the consistent behavior of standardized pre-up, post-up, pre-down and post-down PHASE values.  It is not fair to the larger community for RedHat engineers to change this to disrupt the behavior of other flavors of Linux.  (if-pre-up.d and if-post-down.d is bug number 600167 at https://bugzilla.gnome.org/show_bug.cgi?id=600167)
Comment 1 Dan Williams 2010-01-20 22:39:05 UTC

*** This bug has been marked as a duplicate of bug 387832 ***