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

Re: small fix for Debian AMD64 HowTo



Sebastian Kuegler wrote:
> exec dchroot -c ia32 -d "$(basename $0)" "$@"
>                                        ^^^
> to: 
> 
> exec dchroot -c ia32 -d "$(basename $0) $@
>                                        ^
> So the command with arguments gets passed into the chroot, rather than be
> interpreted as arguments of the dchroot program.

I am sure you meant to include the final " on the end of that line.

Actually the problem is the additional interpretation by 'su' in the
chroot.  So it is the 'su' command that is seeing the option.

There is a subtle difference between "$@" and "$*".  The first quotes
all arguments individually and the second groups them all together.
Normally shell scripts should use "$@" to preserve arguments exactly
when passing them allong in wrappers.  But due to a deficiency in
dchroot this does not work.

I am thinking the following is really what you were trying to say.
But actually I don't like it.  I would rather see dchroot improved
intead.

  exec dchroot -c ia32 -d "$(basename $0) $*"

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: