adding scripts for NetworkManagerDispatcher



Hello all -

I've been playing with NetworkManager a bit over the past couple of days, and it's great.  Thanks for working on it.  I'm looking forward to the machine-wide configuration features in 0.7.

I needed to run a script after getting an address from the DHCP server, a script to set up my firewall.  It took me a bit to figure out how to make this work, and I wanted to post what I figured out to this list to see if I missed anything important.  I'll write down what I learned; if I've gotten any of this wrong corrections are most welcome.

- the script needs to go into the /etc/NetworkManager/dispatcher.d directory

- the script must be a regular file (not a symlink), and must be owned by root.

- the script must be writable only by root, and must not be setuid

- the script must be executable by root

- the script is passed two arguments, the name of the interface and the operation.  The operation is one of "pre-up", "up", "down", or "post-down".

- if there are multiple scripts in the dispatcher.d directory, they are not called in any particular order.  (In the Ubuntu Eft packaging, the script "01ifupdown" is shipped in that directory.  Despite the name, the scripts could be called in any order.)

Do I have this right?  Am I missing anything critical?

Regards,
Brian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]