X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F23networking;h=86d456213d444cf1430d9bb35b0d0a5868dcdd64;hb=2d129205223e1fb6322bb03a9cb9fdf1736885b8;hp=871d8c0b84c74f0e9a70764bfa0995ff783330fd;hpb=52dcef518bdb95605670b8dc12257057bf7a2dc0;p=live-boot-grml.git diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index 871d8c0..86d4562 100755 --- a/scripts/live-bottom/23networking +++ b/scripts/live-bottom/23networking @@ -51,24 +51,32 @@ 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} +EOF + +if [ -n "${ifgateway}" ] +then + +cat >> "${IFFILE}" << EOF gateway ${ifgateway} EOF +fi + done else if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ] @@ -81,8 +89,8 @@ else method="manual" fi - # iterate the physical interfaces and add them to the interfaces list - if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) + # iterate the physical interfaces and add them to the interfaces list and also add when ethdevice= called on cmdline + if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) || [ ! -z "${ETHDEVICE}" ] then for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan* do @@ -90,7 +98,7 @@ else i="$(basename ${interface})" cat >> "${IFFILE}" << EOF -auto ${i} +allow-hotplug ${i} iface ${i} inet ${method} EOF @@ -138,7 +146,7 @@ fi # grep -q "iface ${i}" ${IFFILE} && continue # #cat >> "${IFFILE}" << EOF -#auto ${i} +#allow-hotplug ${i} #iface ${i} inet dhcp # #EOF