On Fri, Mar 19, 2004, David M. Fetter wrote:

> One of my co-workers told me he found a conflict with rc being called.
> See below:
>
> so, the problem manifests which this little script:
>
> ---
> #!/usr/local/lib/openpkg/bash --noprofile
>
> source /usr/local/openpkg/rc.func
>
> rcService  sendmail enable yes
> echo $?
>
> rcService  sendmail usable yes
> echo $?
>
> rcService  sendmail active yes
> echo $?
> -----
>
> the problem is on line 180:
>         eval `rc ${1} status`
>
> it should be calling 'rc' with an explicit pathname.  In my case, it's
> grabbing /usr/local/bin/rc which is the plan 9 shell and spewing garbage
> (lots of nulls, in particular).
>
> I wanted to email this to you to get your take in the event it may be
> something you want to address or perhaps something we're doing wrong
> when calling the script.

The rc.func is not intended to be used stand-alone. It is intended for
use by <prefix>/etc/rc internally only. That it is running "rc" without
a path is intentional, because all rc.xxx scripts do it similarly. And
it works correctly because <prefix>/etc/rc adjusts the PATH in addition
to some other required environment changes.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to