needrestart
needrestart copied to clipboard
should detect dhclient
i have found that dhclient is in the "blacklist" deployed at least by default on Debian. this is because of https://github.com/liske/needrestart/commit/54e443b983c37c94abc1f7bbdfcb6315c5578ec5 and Debian bug 752111 which said this was causing trouble with network managers like wicd.service.
i would argue, however, that it's not a great idea to just completely silence this warning altogether. i understand the desire to keep network managers from being forcibly restarted, but it would be better to do this at the service level than at the detection level.
because as things stand now, a long-running system daemon (which runs as root too) will not be detected as "needing a restart" by this program, which feels problematic.
we already have networking
in override_rc
. we could add qr(^ifup@.+\.service)
(which i have found on some servers) and wicd
. we'd probably need to add network manager and other things as well.
but this exception doesn't seem like the right way to go: it's not like sudo
or apt
, which are expected to complete and shouldn't matter much if they don't. dhclient
is kind of a big deal...
At the days of Debian Bug#752111 it was impossible to detect reliable howto get dhclient restarted at all. If some logic could be implemented to detect the various networking configuration frameworks (ifupdown*, NetworkManager, netplan, ...) it might be possible to implement some special handler triggering the dhclient restart somehow.
why don't we simply add ^ifup@
to the list of services to skip restarts on then? you already have NetworkManager in the override_rc list, simply adding ifup and whatever else shouldn't get triggered should be enough here, shouldn't it?