From 07bfc7aa9dfb81432bad2e22c43d56b1c147d2e5 Mon Sep 17 00:00:00 2001 From: Allen Martin Date: Tue, 13 Jul 2010 15:44:59 -0700 Subject: [PATCH] Separate out additional cmd line args to chroot This fix separates out any additional command line arguments given to the enter_chroot.sh script when passed to the interior chroot. This allows one to pass environment variable settings to the interior chroot shell such as: ./enter_chroot.sh -- CHROME_ORIGIN=LOCAL_SOURCE emerge-x86-generic ... Before this fix any of these variable settings will be sucked up by the shell launching the chroot, not the interior shell. BUG=chromium-os:2457 TEST=ran test cases detailed in bug report Review URL: http://codereview.chromium.org/2855034 --- enter_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enter_chroot.sh b/enter_chroot.sh index 9d2117cd6b..a430482355 100755 --- a/enter_chroot.sh +++ b/enter_chroot.sh @@ -264,7 +264,7 @@ CHROOT_PASSTHRU="CHROMEOS_REVISION=$REVISION BUILDBOT_BUILD=$FLAGS_build_number # the source trunk for scripts that may need to print it (e.g. # build_image.sh). sudo chroot "$FLAGS_chroot" sudo -i -u $USER $CHROOT_PASSTHRU \ - EXTERNAL_TRUNK_PATH="${FLAGS_trunk}" LANG=C "$@" + EXTERNAL_TRUNK_PATH="${FLAGS_trunk}" LANG=C -- "$@" # Remove trap and explicitly unmount trap - EXIT