Force hostname inclusion in /etc/hosts

Signed-off-by: Tanya Degurechaff <34323200+TanyaEleventhGoddess@users.noreply.github.com>
This commit is contained in:
Tanya Degurechaff 2020-07-04 19:41:17 +02:00
parent 59e707a5ca
commit afa18e5a30
2 changed files with 22 additions and 0 deletions

View File

@ -120,6 +120,17 @@ EOF
# set the hostname # set the hostname
cat <<EOF > $rootfs/etc/hostname cat <<EOF > $rootfs/etc/hostname
$hostname $hostname
EOF
# set minimal hosts
cat <<EOF > $rootfs/etc/hosts
127.0.0.1 localhost
127.0.1.1 $hostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF EOF
# reconfigure some services # reconfigure some services

View File

@ -121,6 +121,17 @@ EOF
# set the hostname # set the hostname
cat <<EOF > $rootfs/etc/hostname cat <<EOF > $rootfs/etc/hostname
$hostname $hostname
EOF
# set minimal hosts
cat <<EOF > $rootfs/etc/hosts
127.0.0.1 localhost
127.0.1.1 $hostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF EOF
# reconfigure some services # reconfigure some services