[systemd-devel] How to verify that my ethernet interface is really reconfigured?
Jovic, Vladimir
vladimir.jovic at ifm.com
Mon Mar 7 12:26:01 UTC 2022
Hi,
I am writing a program, that will manage configuration of the ethernet interface on my device.
I created conf files in "/lib/systemd/network/" and my ethernet is configured fine. After I modify these conf files, I call "networkctl reload", and the ethernet gets reconfigured.
The problem is, I don't get any feedback. If I enter wrong values (for example "Address=19jj2.168.1.5" - mind the "jj"), the ethernet will not be configured, and I will not know. "networkctl reload" always return "0".
I tried looking what happens on dbus with "dbus-monitor --system" and the output is always the same - both for correct and incorrect config files.
I was told that I have to look into logs, or with "systemctl status systemd-networkd", but I don't want to have to parse logs. I would also not like to have to read actual ethernet configuration (maybe with ifconfig or ip, then parse).
Is there a networkd way of checking if and how an ethernet interface is configured? Dbus interface for this would be perfect :) I am looking for something like network manager interface.
Cheers,
Vladimir
More information about the systemd-devel
mailing list