X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F18hostname;h=1dbb8978e4ee80eecd28d859dd27d6eae4407895;hb=b0ed7d4fd478305f56314fbe58fd41a3df2dda3a;hp=e854eb20e082b494501ae651afbd484863add086;hpb=ccea277caf476cdfef4c0f953df5a97062d8be42;p=live-boot-grml.git diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname index e854eb2..1dbb897 100755 --- a/scripts/live-bottom/18hostname +++ b/scripts/live-bottom/18hostname @@ -20,16 +20,22 @@ esac # live-initramfs header +if [ -n "${NOHOSTS}" ] +then + exit 0 +fi + . /scripts/live-functions log_begin_msg "Setting hostname..." # live-initramfs script -echo "$HOSTNAME" > /root/etc/hostname -cat > /root/etc/hosts < /root/etc/hostname + +cat >> /root/etc/hosts << EOF 127.0.0.1 localhost -127.0.1.1 $HOSTNAME +127.0.1.1 ${HOSTNAME} # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback @@ -38,7 +44,6 @@ ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts - EOF log_end_msg