summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorCody A.W. Somerville <cody.somerville@canonical.com>2011-07-21 18:35:56 +0200
committerDaniel Baumann <daniel@debian.org>2011-07-21 18:35:56 +0200
commit50816947a79f9f407e237cca563a14f2a33b76d5 (patch)
tree9151ebe28994684136cdf5c237a01a8f4f79fa5b /scripts/build
parente01424a1f26f4d7607201c784b8bca13c100aa9f (diff)
downloadvyos-live-build-50816947a79f9f407e237cca563a14f2a33b76d5.tar.gz
vyos-live-build-50816947a79f9f407e237cca563a14f2a33b76d5.zip
Making config tree available to chroot hooks.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_chroot_hooks9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks
index 5c4df7d6b..2baf77068 100755
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -69,6 +69,11 @@ then
# Restoring cache
Restore_cache cache/packages_chroot
+ # Make build config available to chroot hooks.
+ mkdir -p chroot/root/config
+ mount --bind config/ chroot/root/config
+ mount -o remount,ro chroot/root/config
+
for _HOOK in config/hooks/*.chroot
do
# Copying hook
@@ -87,6 +92,10 @@ then
rm -f chroot/root/"$(basename ${_HOOK})"
done
+ # Remove bind mount of build config inside chroot.
+ umount chroot/root/config/
+ rmdir chroot/root/config/
+
# Saving cache
Save_cache cache/packages_chroot