Set the hostname on /etc/hosts for debian boxes in case it is not set
For some reason Squeeze does not add that for us
This commit is contained in:
parent
ebad7b1a07
commit
aa222974eb
1 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,13 @@ EOF
|
||||||
$hostname
|
$hostname
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# set the host in case it is not set so that sudo does not complain about the host
|
||||||
|
if ! (grep -q $hostname $rootfs/etc/hosts); then
|
||||||
|
chroot $rootfs sed -i -e \
|
||||||
|
"s/^127.0.0.1\(\s\+\)localhost$/127.0.0.1\1localhost\n127.0.0.1\1${hostname}/g" \
|
||||||
|
/etc/hosts >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
# set default locale
|
# set default locale
|
||||||
cat <<EOF > $rootfs/etc/locale.gen
|
cat <<EOF > $rootfs/etc/locale.gen
|
||||||
en_US.UTF-8 UTF-8
|
en_US.UTF-8 UTF-8
|
||||||
|
|
Loading…
Reference in a new issue