On Thu, 21 Jun 2018 10:38:50 +0200 Andreas Schmidt <[email protected]> wrote:
> after I updated needrestart from 3.1-1 to 3.2-1, I noticed a change in
> services
> that needrestart automatically selects for restarting. Previously, services
> like dbus or lightdm were presented as restartable, but the option chosen by
> default was "Restart? No!". After the update, the option automatically chosen
> for lightdm was "Restart? Yes!".
This looks like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902031
Bug #902031 also identifies the upstream commit where this bug was
introduced. Please try patching your /usr/sbin/needrestart with the
attached patch and test, if it restores the correct behaviour for you.
Grüße,
Sven.
--- a/needrestart
+++ b/needrestart
@@ -186,12 +186,7 @@
# slurp config file
print STDERR "$LOGPREF eval $opt_c\n" if($nrconf{verbosity} > 1);
-eval do {
- local $/;
- open my $fh, $opt_c or die "ERROR: $!\n";
- <$fh>;
- close($fh);
-};
+eval do { local(@ARGV, $/) = $opt_c; <>};
die "Error parsing $opt_c: $@" if($@);
# fallback to stdio on verbose mode