Subject: Re: rc.subr problem with interpreted daemons
To: None <lukem@wasabisystems.com>
From: Ed Ravin <eravin@panix.com>
List: tech-userlevel
Date: 03/19/2002 12:19:29
Luke Mewburn writes:
[...]
> The intention is to
> support "interpreters" for arbitrary rc.d commands, such that
> check_process() and check_pidfile() do the right thing.
>
> I've been considering the "cleanest" way to do this;
[...]
> My current thoughts are along the lines of supporting two more
> optional variables:
> interpreter interpreter-name
> command_shift # of args to shift to find the command
How about a user-supplied match pattern or regexp instead? Then you
have only one parameter in the rc.d script instead of two. Also, there's
the possibility of false positives when matching this way - consider:
frog_interpreter=/bin/sh
frog_command_shift=2
Would match both:
/bin/sh -c frog
and
/bin/sh ./myscript frog
Which would cause problems if you didn't have a pidfile.