On Fri, Jul 19, 2013 at 02:49:50PM +0200, Jiri Pirko wrote:
>> What if NM is running but does not handle specified device?
I guess we
>> need to call "ip link set x down" in that case as well.
>
>Yes, that would probably be the case, I don't detect these cases yet and
>just assume that NM either manages all of them except the controller
>device, or none of them. The problem is that currently mixing NM with
>normal configuration is not a very good idea anyway... I could add this
>check if you want it but I already dislike that I need 20 lines of dbus
>code just to disconnect a device and would prefer it shorter.
hmm, right. I think we should be able to do this mixed config scenario.
Should not be problem to just look at the beginning if devices is
handled by NM or not and act accordingly...
I'll look into it next week, it might be a bit complicated because of
how slaves handle configuration right now, but I have a feeling it might
get easier once I make slaves remeber what device is configured with
what.
>
>Another alternative is to use ifdown for this, I didn't test it but
>yesterday pavlix and jklimes told me that it detects if NM is running
>and either uses 'nmcli' or 'ip' to disconnect the device. But since
it's
>a part of initscripts which is kinda getting replaced by systemd I don't
>know if it's a good idea.
We should not depend on initscripts - they are RHEL/Fedora specific.
Agreed.