Subject: Re: rc.subr problem with interpreted daemons
To: None <>
From: Ed Ravin <>
List: tech-userlevel
Date: 03/20/2002 12:32:00
Luke Mewburn writes:
> I've implemented a more general solution, which I'll commit tomorrow.
> If $command_interpreted != "", then the first line of $command is
> parsed to build up a command string and that's searched for instead.
> For example, if the script "frog" has:
> 	#! /bin/sh   -e
> then check_{process,pidfile}() will match:
> 	/bin/sh -e frog
> 	/bin/sh -e frog more_args
> but won't match
> 	/bin/sh -e froglegs
> The rc.d script writer just needs to set command_interpreted=foo.

I like this solution, but there's one potential bugaboo:

   $ head -3 make_class
   #! /usr/local/bin/scsh \
   -e main -s

The above fragment is the start of an scsh script I ran into
the other day.  Do you want to parse these multi-line magic lines?

> I'm "sleeping" on the code before commit, but it seems to work as
> expected in my testing.

I'll be happy to test potential solutions in my environment if you
want another tester.

	-- Ed