ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
cat >> "${IFFILE}" << EOF
-auto ${ifname}
+allow-hotplug ${ifname}
iface ${ifname} inet static
address ${ifaddress}
netmask ${ifnetmask}
done
else
- if [ -z "${NETBOOT}" ]
+ if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
then
# default, dhcp assigned
method="dhcp"
i="$(basename ${interface})"
cat >> "${IFFILE}" << EOF
-auto ${i}
+allow-hotplug ${i}
iface ${i} inet ${method}
EOF
# grep -q "iface ${i}" ${IFFILE} && continue
#
#cat >> "${IFFILE}" << EOF
-#auto ${i}
+#allow-hotplug ${i}
#iface ${i} inet dhcp
#
#EOF