Fixing bash script bogosity - help?

Bert Freudenberg bert at freudenbergs.de
Tue Apr 28 07:50:53 EDT 2009


On 28.04.2009, at 13:37, Martin Langhoff wrote:

> On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams
> <ivazqueznet at gmail.com> wrote:
>> Ah, I see now.
>>
>> Try this:
>>
>> bash -c 'touch "$@"' "${CMD[@]}"
>
> Riiight, that works better... but
>
>> Or in the case of the full script:
>>
>> bash -c "$ERL"' "$@"' "${ERL_COMMAND[@]}"
>
> ...it doesn't work for runuser -- which is the real target. Runuser
> looks at the added params after -c and tries to parse them. There
> doesn't seem to be any support for passing parameters.
>
> hmmmmm.

Maybe you should use su directly instead of runuser?

- Bert -




More information about the Devel mailing list