forked from neil/lxc-templates
Force hostname inclusion in /etc/hosts
Signed-off-by: Tanya Degurechaff <34323200+TanyaEleventhGoddess@users.noreply.github.com>
This commit is contained in:
parent
59e707a5ca
commit
afa18e5a30
@ -120,6 +120,17 @@ EOF
|
||||
# set the hostname
|
||||
cat <<EOF > $rootfs/etc/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
|
||||
|
||||
# reconfigure some services
|
||||
|
@ -121,6 +121,17 @@ EOF
|
||||
# set the hostname
|
||||
cat <<EOF > $rootfs/etc/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
|
||||
|
||||
# reconfigure some services
|
||||
|
Loading…
Reference in New Issue
Block a user