summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-10-13 13:24:56 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:47 +0100
commit9e766a06efab97006fb987cafd3addd237db34b5 (patch)
treea623df80d925f4b7a79a9b14bebb64e6d8ce0ac1
parentefa4b9aaa3407f7d9f28becee54bb3cf2ed4b568 (diff)
downloadlive-build-9e766a06efab97006fb987cafd3addd237db34b5.zip
live-build-9e766a06efab97006fb987cafd3addd237db34b5.tar.gz
Respecting /etc/hostname in case it's part of chroot_local-includes, thanks to Luigi Capriotti <l.capriotti@xbmc.org> for the idea.
-rwxr-xr-xhelpers/lh_chroot_hostname6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/lh_chroot_hostname b/helpers/lh_chroot_hostname
index 2df0aa2..17b5499 100755
--- a/helpers/lh_chroot_hostname
+++ b/helpers/lh_chroot_hostname
@@ -70,6 +70,12 @@ EOF
# Creating lock file
Create_lockfile .lock
+ # Copying hostname from local-includes, if existing
+ if [ -e config/chroot_local-includes/etc/hostname ]
+ then
+ cp -a config/chroot_local-includes/etc/hostname chroot/etc/hostname
+ fi
+
Echo_message "Deconfiguring file /bin/hostname"
# Restore hostname file