Hacker News new | ask | show | jobs
by lksgkjhsgkjh 3446 days ago
networkd doesn't know about wpa_supplicant, just as it doesn't know about openvpn, vpnc, ...

If you want a network manager that does know about those and might give more helpful error messages if they fail, use for example NetworkManager.

3 comments

Then perhaps networkd should be dropped, because:

repeat after me:

everything eventually fails.

How can you tell when a programmer has graduated from "completely new at this" to "has some valuable experience"? That point comes when they stop assuming success.

Check for error and do something useful with the returned value.

Write tests yourself.

Fail gracefully.

Log status, so you know what was happening just before it failed.

Set reasonable timeouts on external processes.

Systemd is written from the perspective of a laptop user who will hand over the whole thing to a support tech when things go wrong. This is antithetical to the spirit of UNIX, which is not "write programs with one purpose that chain together well".

The spirit of UNIX is this: At any time, a user on the system may decide to become a developer or a sysadmin. The tools and information they need should be available.

`ifconfig`, `ip`, `dhclient` or Debian's `ifupdown` don't care about errors from wpa_supplicant either. Let's drop them too?

Or actually all of them (including networkd) work fine, but are not the right tool for every usecase.

well ifconfig (net-tools) actually is not pre-installed for fedora > 19 or 20, basically because not everybody uses them and ip addr gives a more simple output for (most users)
Indeed, I'm not using networkd anymore. And it was just an example, the phenomenon exists all over systemd.

So basically, you're saying that systemd et al integrate with everything on my system, except for when it's useful?

No, I say that networkd is not the right tool for every usecase. For some it is nice, for others not.

Not that different from other tools like `ifupdown`, `NetworkManager`, `wicd`, `connman`, ...

And "not knowing about" a service is enough of an excuse to hide any errors of those services it's configured to run?
Umm, how did you configure networkd to run wpa_supplicant?

Hint: Networkd doesn't run wpa_supplicant. So it can't "hide" anything about it. Or only as much as `ifconfig` "hides" errors from wpa_supplicant.