summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-07-25 18:05:40 +0200
committerDaniel Baumann <daniel@debian.org>2011-07-25 18:05:40 +0200
commitcacf9b6e34d08aaf8f1637d9b14b1db4219582a2 (patch)
tree41993f1189f183dbd77279d26466b3b04f33ce30
parent6b63effdff9ef0c4cb67282b4365cd98fd0586c8 (diff)
downloadvyos-live-build-cacf9b6e34d08aaf8f1637d9b14b1db4219582a2.tar.gz
vyos-live-build-cacf9b6e34d08aaf8f1637d9b14b1db4219582a2.zip
Simplify bind mounting of the config tree during local hooks are run by using read-only bind mounts.
-rwxr-xr-xscripts/build/lb_chroot_hooks7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks
index 2baf77068..708045919 100755
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -71,8 +71,7 @@ then
# 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
+ mount -o bind,ro config chroot/root/config
for _HOOK in config/hooks/*.chroot
do
@@ -93,8 +92,8 @@ then
done
# Remove bind mount of build config inside chroot.
- umount chroot/root/config/
- rmdir chroot/root/config/
+ umount chroot/root/config
+ rmdir chroot/root/config
# Saving cache
Save_cache cache/packages_chroot