summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
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 5d8caad..9c53927 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