From 87374242c6517a898943bdea378108238c4c98ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 6 Jun 2012 21:32:08 +0200 Subject: For consistency, respecting config/environment too for both chroot and binary environments (but the content of sepcific environments for either chroot or binary still has precedence over the generic one). --- functions/chroot.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'functions/chroot.sh') diff --git a/functions/chroot.sh b/functions/chroot.sh index 4d1d9890c..954b5977d 100755 --- a/functions/chroot.sh +++ b/functions/chroot.sh @@ -16,12 +16,15 @@ Chroot () # Executing commands in chroot Echo_debug "Executing: %s" "${COMMANDS}" - if [ -e config/environment.chroot ] - then - ENV="$(grep -v '^#' config/environment.chroot)" - else - ENV="" - fi + ENV="" + + for _FILE in config/environment config/environment.chroot + do + if [ -e "${_FILE}" ] + then + ENV="${ENV} $(grep -v '^#' ${_FILE})" + fi + done if [ "${LB_USE_FAKEROOT}" != "true" ] then -- cgit v1.2.3