needrestart
needrestart copied to clipboard
List-only mode should not require interaction for kernel updates
When using the list-only mode (-r l
), services requiring a restart are just listed and no interaction with needrestart is required. However, when there is a pending kernel update, a UI will still be launched and manual confirmation is required.
You can work around this by just checking for obsolete libraries (-l
), but then you'll not learn about kernel updates at all. In my opinion, list-only mode should include kernel updates in the output list and not require interaction.
The list-only mode only affects the handling of service restarts. You might take a look at the kernelhints
config option:
# Enable/disable hints on pending kernel upgrades:
# 1: requires the user to acknowledge pending kernels
# 0: disable kernel checks completely
# -1: print kernel hints to stderr only
$nrconf{kernelhints} = -1;
Does this help in your use case?
@liske Thanks, it helps in general but (as far as I can see) cannot be set through a command line flag. Since I also can't find a way to set arbitrary config options at runtime, that means I'd have to keep a separate config file for cases with -r l
(namely, the apt trigger).