Comment 27 for bug 336736

Revision history for this message
JoeDuncan (joe-rl-duncan) wrote : Re: [Bug 336736] Re: NetworkManager does not call /etc/network/if-pre-up.d scripts

Eric, I think you have missed the point. Using "pre-up" scripts is what this
bug is about.

"pre-up" script functionality has been removed.

Marlon was asking to how to load iptable configs before an interface comes
up without using "pre-up" scripts.

I had a similar issue, but the only thing I could think of was to hand-edit
the if-up scripts to do what I want - now that's ugly.

On Thu, Dec 10, 2009 at 7:14 AM, Eric Carvalho
<email address hidden>wrote:

> A (ugly) work around is to use the loopback pre-up script.
>
> /etc/network/interfaces:
>
> auto lo
> iface lo inet loopback
> pre-up /path/to/script
>
>
> That way I was able to change my MAC address before the ethX get up.
> I think this could be used to load firewall rules as well.
>
> Definitely, this job should be done by NM.
>
> --
> NetworkManager does not call /etc/network/if-pre-up.d scripts
> https://bugs.launchpad.net/bugs/336736
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “network-manager” package in Ubuntu: Won't Fix
>
> Bug description:
> Binary package hint: network-manager
>
> Ubuntu 8.10, Linux 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:35 UTC 2009
> i686 GNU/Linux
> NetworkManager 0.7~~svn20081018t105859-0ubuntu1.8.10.1
>
> I've been trying to get a script to trigger on the "pre-up" phase of
> network configuration, however, NetworkManager doesn't seem to call it's
> dispatcher for "pre-up" or "post-down" events.
>
> None of the scripts I put in /etc/network/if-pre-up.d ever got called, so I
> added the following line to the top of the dispatcher script
> "/etc/NetworkManager/dispatcher.d/01ifupdown":
>
> logger -t $0 "called with $1 $2"
>
> Where $0 is the name of the script, $1 is the network interface and $2 is
> the network event.
>
> After bringing some network connections up and down, I checked the logs,
> and NetworkManager doesn't seem to be calling
> "/etc/NetworkManager/dispatch.d/01ifupdown" for either "pre-up" or
> "post-down" events. The only entries that show up are for "up" and "down"
> events.
>
> According to the changelog both "pre-up" and "post-down" events are
> supposed to be supported as of version 0.5.1-0ubuntu12:
>
> https://launchpad.net/ubuntu/+source/network-manager
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/336736/+subscribe
>

--
Joe Duncan
PhD Program, Psychology
Queen's University
<email address hidden>
(647)216-9135