Hi

https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id258129
gives an example for a little script to run commands inside the
chroot:

#!/bin/sh

/usr/bin/dchroot -c ia32 -d "`echo $0 | sed 's|^.*/||'`" $*

When using the symlink trick with lpq and trying it with a
command line argument I get (sorry for the german locale ;-) ):

$ lpq -Phgg58_1
(ia32) lpq -Phgg58_1
/bin/su: Ung�ltige Option -- P
Usage: su [OPT] [-] [Benutzername [ARG]]
        -       Wechselt zu einer Login-Shell
        -c, --command=<Befehl>
                �bergibt der gestarteten Shell einen Befehl
                option
       -m, -p, --preserve-environment
                Umgebungsvariablen nicht zur�cksetzen, selbe
                Shell belassen
       -s, --shell=<Shell>
                <Shell> statt der in /etc/passwd Festgelegten
starten
dchroot: Child exited non-zero.
dchroot: Operation failed.

With the following script, it works as expected (note the
closing double quote has changed position).

#!/bin/sh

/usr/bin/dchroot -c ia32 -d "`echo $0 | sed 's|^.*/||'` $*"

Please update the HOWTO.

Regards
-- 
Philipp      | work: [EMAIL PROTECTED]  +41 44 632 60 38
Frauenfelder | home: [EMAIL PROTECTED]    +41 44 862 73 14
[PGP]        | http://www.math.ethz.ch/~pfrauenf/
Proudly running Debian GNU/Linux. See http://www.debian.org/


Reply via email to