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_hostname | |
| 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_hostname')
| -rwxr-xr-x | scripts/build/chroot_hostname | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname index 2b7f3920f..d2faeca8b 100755 --- a/scripts/build/chroot_hostname +++ b/scripts/build/chroot_hostname @@ -67,9 +67,15 @@ EOF Acquire_lockfile # Copying hostname from includes, if existing - if [ -e config/includes.chroot/etc/hostname ] + INCLUDE_DIR=$(select_includes_chroot) + # includes.chroot_before_packages takes the highest precedence + if [ -e config/includes.chroot_before_packages/etc/hostname ] then - cp -a config/includes.chroot/etc/hostname chroot/etc/hostname + INCLUDE_DIR="includes.chroot_before_packages" + fi + if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/hostname ] + then + cp -a config/"${INCLUDE_DIR}"/etc/hostname chroot/etc/hostname fi Echo_message "Deconfiguring file /bin/hostname" |
