public inbox for gentoo-user-br@lists.gentoo.org
 help / color / mirror / Atom feed
From: nunojsilva@ist.utl.pt (Nuno J. Silva)
To: gentoo-user-br@lists.gentoo.org
Subject: [gentoo-user-br] Re: Sobre o Erro no env + chroot
Date: Sun, 24 Oct 2010 13:05:09 +0100	[thread overview]
Message-ID: <87fwvvvlsa.fsf@ist.utl.pt> (raw)
In-Reply-To: AANLkTinycZ1JVceNMW4Vza8Zd61f4y20ZTmDx-OFA6dx@mail.gmail.com

Thiago Nunes <thiagonunesrs@gmail.com>
writes:

> Em 23 de outubro de 2010 14:25, Cleverson Casarin Uliana
> <clever92000@yahoo.com.br> escreveu:
>
>> Aqui a única diferença é o TERM=linux ao invés de TERM=xterm, talvez porque
>> rodei no console fora do Gnome. Mas, novamente retornou "env: chroot:
>> Arquivo ou diretório não encontrado" e não entrou no chroot. Eu sei que não
>> entrou porque continua mostrando /mnt/gentoo # no prompt ao invés de passar
>> para / #
>
> Que locura, é como se o env não estivesse encontrando o chroot no
> $PATH. Podes tentar passar o caminho todo, /bin/chroot.

(O comando que foi usado:
env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash)

Ele não encontra porque o $PATH está vazio. Isso não me passou pela
cabeça, quando respondi na outra thread, mas o que o "-i" faz é ignorar
as variáveis que já estão definidas, pelo que quando "chroot" é avaliado
o ambiente só tem HOME e TERM, e *não* tem PATH.

A não ser que me escape alguma ordem de avaliação da BASH, isto deve
funcionar

  env -i HOME=$HOME TERM=$TERM `which chroot` /mnt/gentoo /bin/bash


Erro da documentação, não?

-- 
Nuno J. Silva
gopher://sdf-eu.org/1/users/njsg




  parent reply	other threads:[~2010-10-24 12:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23  1:08 [gentoo-user-br] Sobre o Erro no env + chroot Cleverson Casarin Uliana
2010-10-23  1:22 ` Dalton Barreto
2010-10-23  5:21 ` Thiago Nunes
2010-10-23 13:37   ` Cleverson Casarin Uliana
2010-10-23 14:46     ` Thiago Nunes
2010-10-23 16:25       ` Cleverson Casarin Uliana
2010-10-23 15:32         ` Thiago Nunes
2010-10-23 23:10           ` Cleverson Casarin Uliana
2010-10-24  0:39             ` Dalton Barreto
2010-10-24  2:19             ` Thiago Nunes
2010-10-24 13:13               ` Cleverson Casarin Uliana
2010-10-24 12:38                 ` Thiago Nunes
2010-10-24 14:14                   ` [gentoo-user-br] " Nuno J. Silva
2010-10-25 12:21                     ` Animal-X®
2010-10-25 16:00                       ` Daniel Medeiros
2010-10-24 20:55                   ` [gentoo-user-br] " Cleverson Casarin Uliana
2010-10-25  2:23                     ` Thiago Nunes
2010-10-24 12:05           ` Nuno J. Silva [this message]
2010-10-24 12:34             ` [gentoo-user-br] " Thiago Nunes
2010-10-24 14:12               ` Nuno J. Silva
2010-10-24 21:20               ` Fabiano - deStilaDo
2010-10-23 17:52 ` [gentoo-user-br] " Fabiano - deStilaDo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwvvvlsa.fsf@ist.utl.pt \
    --to=nunojsilva@ist.utl.pt \
    --cc=gentoo-user-br@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox