X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpatches%2F27_support_static_ip.patch;h=77bec78dc9a3e3850bbd0f149faa3cf8b4f59046;hb=3b3ac7b387df59cc871f6572344f249a203b371c;hp=5f7a67979d4cfd9b6d4af6a9aed0893b4ab75d99;hpb=d3a1d529fc7d38f3d9eb1ba18caaac1143ce4869;p=live-boot-grml.git diff --git a/debian/patches/27_support_static_ip.patch b/debian/patches/27_support_static_ip.patch index 5f7a679..77bec78 100644 --- a/debian/patches/27_support_static_ip.patch +++ b/debian/patches/27_support_static_ip.patch @@ -6,13 +6,22 @@ @DPATCH@ -Index: live-boot-grml/scripts/boot/9990-networking.sh +Index: live-boot-grml/components/9990-networking.sh =================================================================== ---- live-boot-grml.orig/scripts/boot/9990-networking.sh 2012-12-03 07:59:14.790837135 +0100 -+++ live-boot-grml/scripts/boot/9990-networking.sh 2012-12-03 07:59:19.665258773 +0100 -@@ -2,6 +2,24 @@ +--- live-boot-grml.orig/components/9990-networking.sh 2014-03-08 13:35:17.832580835 +0100 ++++ live-boot-grml/components/9990-networking.sh 2014-03-08 13:35:33.106789237 +0100 +@@ -44,7 +44,7 @@ - #set -e + if [ "$bootif_mac" = "$current_mac" ] + then +- DEVICE=${device##*/} ++ ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice + break + fi + fi +@@ -52,6 +52,24 @@ + fi + } +get_ipconfig_para() +{ @@ -35,7 +44,7 @@ Index: live-boot-grml/scripts/boot/9990-networking.sh do_netsetup () { modprobe -q af_packet # For DHCP -@@ -12,8 +30,19 @@ +@@ -62,8 +80,20 @@ [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15 echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration." @@ -53,20 +62,12 @@ Index: live-boot-grml/scripts/boot/9990-networking.sh + echo "Net: Turning on all device links..." + for device in ${ALLDEVICES}; do + ipconfig -c none -d $device -t 1 2>/dev/null >/dev/null -+ done - # support for Syslinux IPAPPEND parameter - # it sets the BOOTIF variable on the kernel parameter - -@@ -54,7 +83,7 @@ ++ done ++ + # See if we can select the device from BOOTIF + Device_from_bootif - if [ "$bootif_mac" = "$current_mac" ] - then -- DEVICE=${device##*/} -+ ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice - break - fi - fi -@@ -67,14 +96,7 @@ +@@ -73,14 +103,7 @@ if [ -z "$ETHDEVICE" ] then echo "If you want to boot from a specific device use bootoption ethdevice=..." @@ -82,7 +83,7 @@ Index: live-boot-grml/scripts/boot/9990-networking.sh fi # split args of ethdevice=eth0,eth1 into "eth0 eth1" -@@ -83,46 +105,28 @@ +@@ -89,42 +112,29 @@ devlist="$devlist $device" done @@ -99,14 +100,14 @@ Index: live-boot-grml/scripts/boot/9990-networking.sh - then - echo "Killing job $jobid for device $dev as ipconfig ran into recursion..." - kill -9 $jobid -+ for dev in $devlist ; do -+ param="$(get_ipconfig_para $dev)" -+ if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then -+ echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log -+ continue ++ for dev in $devlist ; do ++ param="$(get_ipconfig_para $dev)" ++ if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then ++ echo "Ignoring network device $dev due to nodhcp." | tee -a /boot.log ++ continue fi -+ echo "Executing ipconfig -t $ETHDEV_TIMEOUT $param" -+ ipconfig -t "$ETHDEV_TIMEOUT" "$param" | tee -a /netboot.config ++ echo "Executing ipconfig -t $ETHDEV_TIMEOUT $param" ++ ipconfig -t "$ETHDEV_TIMEOUT" "$param" | tee -a /netboot.config # if configuration of device worked we should have an assigned # IP address, if so let's use the device as $DEVICE for later usage. @@ -115,39 +116,35 @@ Index: live-boot-grml/scripts/boot/9990-networking.sh - then - export DEVICE="$dev" - break -+ IPV4ADDR="0.0.0.0" -+ if [ -e "/run/net-${device}.conf" ]; then -+ . /run/net-${device}.conf -+ fi -+ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then -+ export DEVICE="$dev $DEVICE" -+ # break # exit loop as we just use the irst ++ ++ IPV4ADDR="0.0.0.0" ++ if [ -e "/run/net-${device}.conf" ]; then ++ . /run/net-${device}.conf fi - done +- done - else - for interface in ${DEVICE}; do - ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config - -- # squeeze -- [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf -- -- # wheezy - [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf - - if [ "$IPV4ADDR" != "0.0.0.0" ] - then - break -- fi -- done ++ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then ++ export DEVICE="$dev $DEVICE" ++ # break # exit loop as we just use the irst + fi + done - fi -+ unset devlist ++ unset devlist for interface in ${DEVICE} do -Index: live-boot-grml/scripts/boot/9990-cmdline-old +Index: live-boot-grml/components/9990-cmdline-old =================================================================== ---- live-boot-grml.orig/scripts/boot/9990-cmdline-old 2012-12-03 07:59:14.794839124 +0100 -+++ live-boot-grml/scripts/boot/9990-cmdline-old 2012-12-03 07:59:19.665258773 +0100 +--- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 13:35:17.832580835 +0100 ++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:35:17.828581304 +0100 @@ -51,9 +51,8 @@ ;;