summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-05-02 19:31:58 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-05-02 19:31:58 -0300
commite2caf6ccac2f8345f54d0388b00a93562f3e51ee (patch)
tree0dfb4f5f8aeb0ba930079c9930c268f75f61a57d /tools
parentb971e6ff0f8b290234ce51ec63066151532dd166 (diff)
Properly set chroot hostname for architecture x86_64.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/chroot.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/chroot.sh b/tools/chroot.sh
index 5d8caad0..9c53927f 100755
--- a/tools/chroot.sh
+++ b/tools/chroot.sh
@@ -33,6 +33,8 @@ debootstrap $DISTRO_VERSION $CHROOT_PATH $mirror
cp /etc/resolv.conf $CHROOT_PATH/etc/resolv.conf
cp /etc/hosts $CHROOT_PATH/etc/hosts
hostname=$USER-$DISTRO-$DISTRO_VERSION-$ARCH-chroot
+# hostnames cannot contain _
+hostname=$(echo $hostname | sed s/'_'/'-'/g)
echo $hostname > $CHROOT_PATH/etc/hostname
chroot $CHROOT_PATH hostname $hostname