X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=blobdiff_plain;f=components%2F9990-networking.sh;fp=components%2F9990-networking.sh;h=292710741c2133dbe0f0e3449fe3e232b7af2afe;hp=8e059c9f0d2b414884380bb70d875de2690de4be;hb=43b5c8a4df961f5346e2ce176d6efe7495ddff14;hpb=8d2dac82e4d75ef257dda8304eed41b77b20bd07 diff --git a/components/9990-networking.sh b/components/9990-networking.sh index 8e059c9..2927107 100755 --- a/components/9990-networking.sh +++ b/components/9990-networking.sh @@ -131,6 +131,22 @@ do_netsetup () HWADDR="$(cat /sys/class/net/${interface}/address)" fi + # Only create /etc/hosts if FQDN is known (to let 'hostname -f' query + # this file). Otherwise DNS will be queried to determine the FQDN. + if [ ! -e "/etc/hosts" ] && [ -n "${DNSDOMAIN}" ] + then + echo "Creating /etc/hosts" + cat > /etc/hosts <