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
This commit is contained in:
Michael Marineau 2014-07-03 14:51:32 -07:00
parent 319db165db
commit a075b1085a

View File

@ -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() {