Running applications inside the chroot
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: pfrauenf@math.ethz.ch +41 44 632 60 38
Frauenfelder | home: pfrauenf@debian.org +41 44 862 73 14
[PGP] | http://www.math.ethz.ch/~pfrauenf/
Proudly running Debian GNU/Linux. See http://www.debian.org/
Reply to: