diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-21 14:24:21 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-21 14:31:58 +0000 |
commit | 5cc18e76ac15d77dbf58f2c6f63117d4575d4994 (patch) | |
tree | 2e79ec9f82af9bc580cadad7b8eff31926b80351 /run-bootstrap-in-chroot | |
parent | c567d63b28ac9d37b0c2a0db8dcb6b70e0665f55 (diff) | |
download | morph-5cc18e76ac15d77dbf58f2c6f63117d4575d4994.tar.gz |
bootstrap: alter chroot hostname after debootstrap
It is possible that the hostname setting code will be reached
without squeeze-chroot being extracted, so /etc won't exist
Since this will be overwritten by later snapshot values anyway
this step may as well only be done while making the squeeze
chroot
Diffstat (limited to 'run-bootstrap-in-chroot')
-rwxr-xr-x | run-bootstrap-in-chroot | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/run-bootstrap-in-chroot b/run-bootstrap-in-chroot index c934bc1b..5f5e4eee 100755 --- a/run-bootstrap-in-chroot +++ b/run-bootstrap-in-chroot @@ -124,7 +124,14 @@ if ! "$snapshot" || ! has_pass pass1a; then --include=autopoint,automake,gettext,libtool,help2man \ --include=texinfo,sudo,ccache,gperf \ squeeze "$dir" "$DEBIAN_MIRROR" - + + mkdir -p "$dir/etc" + hostname > "$dir/etc/hostname" + cat <<EOF > "$dir/etc/hosts" +127.0.0.1 localhost +127.0.1.1 `hostname` +EOF + # create the directory for cached ccache object files mkdir -p "$dir/var/tmp/ccache" @@ -148,12 +155,6 @@ EOF fi fi -hostname > "$dir/etc/hostname" -cat <<EOF > "$dir/etc/hosts" -127.0.0.1 localhost -127.0.1.1 `hostname` -EOF - # Unpack existing snapshot, or run pass1 of bootstrap and then make snapshot. if ! "$snapshot" || ! has_pass pass1b |