Re: (Go) Library for configuring Yocto based boxes?
Christofer Dutz <christofer.dutz@...>
Hi all,
so I guess this is another case of "I should have posed my question earlier, than I would have found the soltion myself" ;-) So it turns out that: err = propertyConnection.Update(connectionSettings) Only updates the settings, however it doesn't actiavate the changes (This happens on the next boot) ... But if I also run _, err = nm.ActivateConnection(propertyConnection, device, nil) The changes seem to be applied instantly :-) So I guess I'm now safe and managed to get the things I needed working. I had a look and NetworkManager doesn't seem to be running, I can find a process systemd-networkd however, so I guess everything is setup correctly. I also used the nmcli to experiment. Do I understand it correctly, is systemd-networkd a different implementation of the same service as NetworkManager? Because I can see the configs beeing written to "/etc/NetworkManager/system-connections"? Chris -----Ursprüngliche Nachricht----- Von: Nicolas Jeker <n.jeker@...> Gesendet: Montag, 2. August 2021 13:18 An: Christofer Dutz <christofer.dutz@...>; yocto@... Betreff: Re: [yocto] (Go) Library for configuring Yocto based boxes? On Mon, 2021-08-02 at 09:35 +0000, Christofer Dutz wrote: Hi all,systemd-networkd and NetworkManager are two different things. Make sure that you only have one of them running at the same time. A quick solution is to use systemd to disable the systemd-networkd service (if that's not already the case). What I did as a more long- term solution is removing systemd-networkd in my distro.conf (works in local.conf, too): PACKAGECONFIG_remove_pn-systemd = "networkd" The network settings don't change (Both network devices were set toI'm currently using nmcli to set my configuration and apply it with: nmcli con up {connection-id} This works for me even if the connection status is already "up". Not sure if it works when you replace the configuration file, but you might give it a try. Otherwise restarting NetworkManager should work: systemctl restart NetworkManager However if I reboot the box, I can see my changes applied ... until II suspect this happens because systemd-networkd "overrides" the interface configuration that was set by NetworkManager. Any tips on how I can apply my changes without rebooting? |
|