diff options
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" |