Re: F13 : setup NM runlevel 3



On Sunday 24 of October 2010 23:18:05 sean darcy wrote:
> I want to run a script when an interface goes up on a remote server.
> Since post-up no longer works, I need to use a dispatcher.d script. And
> that means NM. Sigh.
> 
First, you are not forced to use NM. You can switch it off and configure the 
interfaces some other way if you prefer.
Nevertheless, dispatcher script are the right way to run post-up (up) scripts 
within NM.
For more info about the dispatcher see:
man NetworkManager
http://markmail.org/message/kd2afd3roenm2xsq

> The server has 2 wired nic's.  I need to make sure both nic's come up on
> reboot. NM is configured for runlevel 3. The only way I can think to get
> NM bring up the nic's is to use nmcli in rc.local:
> 
NetworkManager will bring the interfaces up automatically when the connections 
are configured so ("Connect automatically" checkbox in connection editor, 
ONBOOT=yes in ifcfg files for Fedora/RHEL, autoconnect=true for keyfile plugin 
(which is default), ...).
If you have configured the connection that way, you don't need other tools to 
bring the interface up.

> nmcli con up id  | uuid
> 
> But I can't figure out how or where are the id's (or uuid's) of the
> interfaces. I tried
> 
> nmcli con up iface eth0
> 
> No luck.
> 
> nmcli dev list  doesn't show id's.
> lspci doesn't show them.
> 
> So where do I find the id's. And, is this the way to really make sure NM
> brings up these interfaces?
> 
nmcli tells NM daemon to activate a connection (the same way as nm-applet 
does). The command to do so is:
nmcli con up id "My super connection"   or
nmcli con up uuid a14d3a57-3ba5-4a4d-b8b0-589d4e1d5557

To list your configured connections (with NAMEs (id) and UUIDs (uuid)) use:
nmcli con list

Jirka


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