X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F23networking;h=8c856c6cc2ab24369278f2e8088abf829c3c3bc4;hb=38ff2dffb863b87472111184a12305996fc1e40e;hp=6c726c6deb2f6620ae2ee3472869f6da4757f098;hpb=845dee811a0159b75422eb7e4cfb6c860d39690b;p=live-boot-grml.git diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index 6c726c6..8c856c6 100755 --- a/scripts/live-bottom/23networking +++ b/scripts/live-bottom/23networking @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NONETWORKING}" ] then @@ -27,9 +27,9 @@ fi . /scripts/live-functions -log_begin_msg "Preconfiguring networking..." +log_begin_msg "Preconfiguring networking" -# live-initramfs script +# live-boot script IFFILE="/root/etc/network/interfaces" @@ -46,22 +46,22 @@ iface lo inet loopback EOF -udevtrigger -udevsettle +udevadm trigger +udevadm settle if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ] then - parsed=$(echo "${STATICIP}" | sed -e 's/:/ /g') + parsed=$(echo "${STATICIP}" | sed -e 's/,/ /g') for ifline in ${parsed} do - ifname="$(echo ${ifline} | cut -f1 -d ',')" - ifaddress="$(echo ${ifline} | cut -f2 -d ',')" - ifnetmask="$(echo ${ifline} | cut -f3 -d ',')" - ifgateway="$(echo ${ifline} | cut -f4 -d ',')" + ifname="$(echo ${ifline} | cut -f1 -d ':')" + ifaddress="$(echo ${ifline} | cut -f2 -d ':')" + ifnetmask="$(echo ${ifline} | cut -f3 -d ':')" + ifgateway="$(echo ${ifline} | cut -f4 -d ':')" cat >> "${IFFILE}" << EOF -auto ${ifname} +allow-hotplug ${ifname} iface ${ifname} inet static address ${ifaddress} netmask ${ifnetmask} @@ -71,7 +71,7 @@ EOF done else - if [ -z "${NETBOOT}" ] + if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ] then # default, dhcp assigned method="dhcp" @@ -82,7 +82,7 @@ else fi # iterate the physical interfaces and add them to the interfaces list - if [ "${method}" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ] + if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) then for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan* do @@ -90,7 +90,7 @@ else i="$(basename ${interface})" cat >> "${IFFILE}" << EOF -auto ${i} +allow-hotplug ${i} iface ${i} inet ${method} EOF @@ -119,7 +119,7 @@ EOF cat > /root/etc/resolv.conf << EOF # /etc/resolv.conf -# Autogenerated by live-initramfs +# Autogenerated by live-boot search ${rc_search} domain ${rc_search} ${rc_server0} @@ -138,7 +138,7 @@ fi # grep -q "iface ${i}" ${IFFILE} && continue # #cat >> "${IFFILE}" << EOF -#auto ${i} +#allow-hotplug ${i} #iface ${i} inet dhcp # #EOF