Re: small fix for Debian AMD64 HowTo

2005-01-02 Thread Bob Proulx
Sebastian Kuegler wrote:
> Works, indeed. The following (suggested to me in private email) does also
> work:
> exec dchroot -c ia32 -d "$(basename $0)" -- "$@"

Very good!  I like that best because it preserves the arguments
exactly.  Can someone with commit rights to the howto please make this
update?

Bob


signature.asc
Description: Digital signature


Re: small fix for Debian AMD64 HowTo

2005-01-02 Thread Sebastian Kuegler
Bob Proulx wrote:
> Sebastian Kuegler wrote:
>> 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.

Yes, typo. :> 

> 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.

Of course, fixing dchroot would be nicer. Having this worked around in the
meantime is also a good thing (tm) of course.

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

Works, indeed. The following (suggested to me in private email) does also
work:
exec dchroot -c ia32 -d "$(basename $0)" -- "$@"

Thanks for the suggestions!

> Bob

sebas
-- 
http://vizZzion.org
==
Your conscience never stops you from doing anything.  It just stops you from
enjoying it.






Re: small fix for Debian AMD64 HowTo

2005-01-01 Thread Bob Proulx
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


signature.asc
Description: Digital signature


Re: small fix for Debian AMD64 HowTo

2004-12-30 Thread Matthias Julius
Sebastian Kuegler <[EMAIL PROTECTED]> writes:

> exec dchroot -c ia32 -d "$(basename $0) $@
  ^

That certainly does not work.

Matthias




small fix for Debian AMD64 HowTo

2004-12-29 Thread Sebastian Kuegler
Hi, 

I just followed the AMD64 howto [1] on installing a chroot ia32 environment,
which lead me with a working setup. Thanks for this.

However, there's one minor problem I had: The script do_chroot as suggested
on the webpage didn't work for me when a command was given with paramters.
I could fix this by changing

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.

Maybe someone can fix this minor problem of an otherwise really helpful
howto. (Is this the good place to post this, btw? :-))

[1]
https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html

Cheers,
-- 
sebas
- - - - - - - - - - -
http://vizZzion.org
==
Do you guys know what you're doing, or are you just hacking?