Skip to content

Commit

Permalink
Merge pull request #16 from hggh/fix/upstart
Browse files Browse the repository at this point in the history
added check if init file is a symlink to upstart
  • Loading branch information
liske committed Feb 25, 2016
2 parents 807ac2f + 923fd56 commit 42090fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions needrestart
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ sub parse_lsbinit($) {
my $rc = '/etc/init.d/'.shift;
my %lsb;

if ( -l $rc) {
if (readlink($rc) eq '/lib/init/upstart-job') {
print STDERR "WARNING: $rc is a converted upstart job.\n";
return ();
}
}

open(HLSB, '<', $rc) || die "Can't open $rc: $!\n";
my $found;
while(my $line = <HLSB>) {
Expand Down

0 comments on commit 42090fb

Please sign in to comment.