Doug Anderson 9362fa85c7 Allow specifying environment variables w/ enter_chroot again.
Examples of how people might be using enter_chroot:

1. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2 -- cmd arg1 arg2
   Set env vars and run cmd w/ args
2. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2
   Set env vars and run shell
3. ./enter_chroot [chroot_flags]   -- cmd arg1 arg2
   Run cmd w/ args
4. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2 cmd arg1 arg2
   Like #1 _if_ args aren't flags (if they are, enter_chroot will claim them)
5. ./enter_chroot [chroot_flags]   cmd arg1 arg2
   Like #3 _if_ args aren't flags (if they are, enter_chroot will claim them)

I also updated the help to indicate that whole-command quoting is no longer
supported.  If you really need whole-command quoting (maybe you want in-
chroot redirection), you'll need to use sh -c like:
  ./enter_chroot.sh -- sh -c "echo \"Save me\" > /tmp/save.txt"

You should avoid single quotes in the command and arguments.  This isn't
a new limitation: it's shflags related.

Change-Id: I0452a8730ac9b8197834edc753b9eece69896135

BUG=chromium-os:7072
TEST=Tried a whole bunch of these commands.

Review URL: http://codereview.chromium.org/5840003
2010-12-16 14:44:12 -08:00
2010-09-09 14:25:33 -07:00
2010-07-13 15:34:11 -07:00
2010-08-05 10:37:17 -07:00
2009-10-09 20:56:14 +00:00
2010-06-10 01:36:40 -07:00
Description
image build and composition scripts for Flatcar Container Linux
BSD-3-Clause 167 MiB
Languages
Shell 93.1%
Python 6.9%