Skip to content

Commit

Permalink
Don't restart services with overrides in auto mode (Debian Bug#770937…
Browse files Browse the repository at this point in the history
… by Axel Beckert <abe@debian.org>).
  • Loading branch information
liske committed Nov 25, 2014
1 parent 7692c71 commit 62d07dc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions needrestart
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,20 @@ if(defined($opt_l) && !$uid) {
next;
}

# don't restart greylisted services...
my $restart = !$nrconf{defno};
foreach my $re (keys %{$nrconf{override_rc}}) {
next unless($rc =~ /$re/);

$restart = $nrconf{override_rc}->{$re};
last;
}
# ...but complain about them
unless($restart) {
$ui->notice("Skipping $rc...");
next;
}

my @cmd = restart_cmd($rc);
next unless($#cmd > -1);

Expand Down

0 comments on commit 62d07dc

Please sign in to comment.