NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/42642: /etc/rc.subr fails to recognize daemons started with #!/usr/bin/env

>Number:         42642
>Category:       bin
>Synopsis:       /etc/rc.subr  fails to recognize daemons started with 
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 19 20:50:00 +0000 2010
>Originator:     Ed Ravin
>Release:        5.0.1
Public Access Networks Corp
NetBSD 5.0.1 NetBSD 5.0.1 (PANIX-XEN3U-USER) #0: Thu Nov  5 
07:26:24 EST 2009

If I build an rc.d script for an interpreted daemon, and the first line of the 
daemon is:

   #!/usr/bin/env ruby

Then rc.subr will fail with this error:

  WARNING: $command_interpreter /usr/local/bin/ruby != /usr/bin/env

The problem is that rc.subr runs "ps -o pid,command".  Here's
the sample output - pid 1325 is "/usr/local/bin/ruby" and pid
4396 is "/usr/local/bin/env ruby"

1325 /usr/local/bin/ruby (ruby-1.8.6-p287)
4396 ruby (ruby-1.8.6-p287)


perhaps rc.subr should match the filename in between the parentheses in the "ps 
-o pid,command" output if the first try at matching fails?

Home | Main Index | Thread Index | Old Index