HWADDR="$(cat "/sys/class/net/${interface}/address")"
fi
+ if [ ! -e "/etc/hostname" ] && [ -n "${HOSTNAME}" ]
+ then
+ echo "Creating /etc/hostname"
+ echo "${HOSTNAME}" > /etc/hostname
+ 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}" ]
if [ -n "${DNSDOMAIN}" ]
then
echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
- echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS}
echo "nameserver $i" >> /etc/resolv.conf
fi
done
+
+ if [ -n "${DOMAINSEARCH}" ]
+ then
+ echo "search ${DOMAINSEARCH}" >> /etc/resolv.conf
+ elif [ -n "${DNSDOMAIN}" ]
+ then
+ echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
+ fi
fi
# Check if we have a network device at all