From a075b1085a6a70e9aff122bd3294aa0ace6f77bd Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 3 Jul 2014 14:51:32 -0700 Subject: [PATCH] make_chroot: explicitly set path when entering the chroot. The host system's PATH may not be match the one required by the SDK. When going through the enter_chroot script it gets reset because bash is invoked as a login shell but this doesn't happen when using the plain old chroot command. Fixes https://github.com/coreos/scripts/pull/290 --- sdk_lib/make_chroot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh index bc9fade881..7cfb4d590f 100755 --- a/sdk_lib/make_chroot.sh +++ b/sdk_lib/make_chroot.sh @@ -92,7 +92,8 @@ early_enter_chroot() { # the overhead of enter_chroot, and do not need access to the source tree, # don't need the actual chroot profile env, and can run the command as root. bare_chroot() { - chroot "${FLAGS_chroot}" "$@" + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + chroot "${FLAGS_chroot}" "$@" } cleanup() {