summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-06-06 21:32:08 +0200
committerDaniel Baumann <daniel@debian.org>2012-06-06 21:32:08 +0200
commit87374242c6517a898943bdea378108238c4c98ee (patch)
tree3169c73f0b0d0bc0cffcdb75d386555ab48c0710 /functions
parent0451545abb83602aef13fe4df2a2ea690c77d32f (diff)
downloadvyos-live-build-87374242c6517a898943bdea378108238c4c98ee.tar.gz
vyos-live-build-87374242c6517a898943bdea378108238c4c98ee.zip
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).
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/chroot.sh15
1 files changed, 9 insertions, 6 deletions
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