export a proper debian PATH for the chroot

when running in the chroot, it would be expected to have a Debian-ish environment,
most important the PATH variable. Otherwise the host PATH would be used which can wrong
for Debian, especially if the host is Arch (which doesn't have /bin, /sbin or /usr/sbin).

Signed-off-by: Damjan Georgievski <gdamjan@gmail.com>
This commit is contained in:
Damjan Georgievski 2015-01-27 20:02:24 +01:00 committed by Tianon Gravi
parent b52a2cfdf1
commit a871327135
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ fi
(
set -x
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# make sure we're fully up-to-date
chroot "$rootfsDir" bash -c 'apt-get update && apt-get dist-upgrade -y'