diff options
author | Thore Sommer <debian@thson.de> | 2020-10-27 15:07:11 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-10-27 15:07:11 +0000 |
commit | 7360d50fa6b7ef4809d28cf873ab7d29dc2a6f97 (patch) | |
tree | 609b88fd0c2840a14688a6bd18b185fd686a7781 /scripts/build/chroot_resolv | |
parent | 7b19209aaeb14719d8029fa321aa39aef08b6e94 (diff) | |
download | vyos-live-build-7360d50fa6b7ef4809d28cf873ab7d29dc2a6f97.tar.gz vyos-live-build-7360d50fa6b7ef4809d28cf873ab7d29dc2a6f97.zip |
Added the option to include files before and after package installation
Moved includes.chroot to includes.chroot_after_packages and added
includes.chroot_before_packages. includes.chroot does still work as before.
We also now use rsync for copying files if it is installed.
This improves runtime and space consumption for large includes.
Gbp-Dch: Short
Closes: #927128
Diffstat (limited to 'scripts/build/chroot_resolv')
-rwxr-xr-x | scripts/build/chroot_resolv | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build/chroot_resolv b/scripts/build/chroot_resolv index c943f259d..49cb978ee 100755 --- a/scripts/build/chroot_resolv +++ b/scripts/build/chroot_resolv @@ -75,10 +75,16 @@ case "${_ACTION}" in # Acquire lock file Acquire_lockfile - if [ -e config/includes.chroot/etc/resolv.conf ] + INCLUDE_DIR=$(select_includes_chroot) + # includes.chroot_before_packages takes the highest precedence + if [ -e config/includes.chroot_before_packages/etc/resolv.conf ] + then + INCLUDE_DIR="includes.chroot_before_packages" + fi + if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/resolv.conf ] then # Copying local resolv.conf - cp config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf + cp config/"${INCLUDE_DIR}"/etc/resolv.conf chroot/etc/resolv.conf chmod 644 chroot/etc/resolv.conf Chroot chroot "chown root:root /etc/resolv.conf" rm -f chroot/etc/resolv.conf.orig |