mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 08:01:14 +02:00
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
Description
Languages
Shell
93.1%
Python
6.9%