Write hostname to installed system (fix for bedb4090)
authorMichael Prokop <mika@grml.org>
Thu, 4 Jun 2015 12:54:43 +0000 (14:54 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 4 Jun 2015 12:56:02 +0000 (14:56 +0200)
Fixes #54 @ github
Thanks: Sebastian Pipping <sebastian@pipping.org> for catching this issue

grml-debootstrap

index 2a6a6e9..b013ec2 100755 (executable)
@@ -1427,7 +1427,7 @@ iface eth0 inet dhcp
 # execute all scripts in /etc/debootstrap/pre-scripts/ {{{
 execute_pre_scripts() {
   # make sure hostname is set even before chroot-script get executed
 # execute all scripts in /etc/debootstrap/pre-scripts/ {{{
 execute_pre_scripts() {
   # make sure hostname is set even before chroot-script get executed
-  echo "$HOSTNAME" > /etc/hostname
+  echo "$HOSTNAME" > "$MNTPOINT"/etc/hostname
 
   # make sure we have $MNTPOINT available for our scripts
   export MNTPOINT
 
   # make sure we have $MNTPOINT available for our scripts
   export MNTPOINT