[Mageia-dev] NetworkManager vs initscripts

JA Magallón jamagallon at ono.com
Tue Dec 4 01:12:39 CET 2012


On 11/28/2012 03:15 PM, Jose Jorge wrote:
> Le 28/11/2012 14:05, Johnny A. Solbu a écrit :
>> On Wednesday 28. November 2012 12.44, Olivier Blin wrote:
>>> You can just set NM_CONTROLLED=yes in the generated ifcfg files.
>>
>> If the interface is configured using NetworkManager, why doesn't NM itself create the file, if it doesn't exist, and add the line, to prevent this?
>> Perhaps a checkbox could be added to make it happen.
>
> Because the GUI tools and the installer always create this file. Except hackers, no one removes it, ans MCC adds  NM_CONTROLLED=yes if you check the box in the GUI!
>

Well, this is what I have undestood and checked, plz correct me if wrong:
- initscripts always want an ifcfg-eth0 (-wlan0) file
- if it is not there, it is created by udev
- mageia gui tools set the NM_CONTROLLED flag, but still rely on the ifcfg-rh
   plugin to let NM pull the config from there

To get the most 'pure' NM setup I could, I did this:
- disabled the ifcfg-rh plugin in NM.conf, just keyfile
- configured the network via nm-connection-editor, stored system wide
   in /etc/NetworkManager/system-connections
- creaed a dummy ifcfg-eth0 file with
     DEVICE=eth0
     NM_CONTROLLED=yes
  lines. No network info in there...just dummy file for initscripts to ignore it,
  as udev will be trying to create it with DHCP setup if not present...

Perhaps GUI toos and installer could do this also, if user wants the interface
to be managed by NM. Perhaps it is time to deprecate ifcfg-rh and create native
files for NM...
NM is ispecially usefull if you connect to multiple wifis and want different
routers/DNS/domains depending on your wifi network.

Thanks.

PD: diggin a bit I found /etc/sysconfig/udev_net, with its BLACKLIST lists,
and found also about /etc/sysconfit/network and AUTOMATIC_IFCFG
(see /lib/udev/net_create_ifcfg).
Places to play...

-- 
J.A. Magallon <jamagallon()ono!com>        \               Winter is coming...


More information about the Mageia-dev mailing list