Refresh debian/patches/35_fix_findiso_umount.patch
[live-boot-grml.git] / debian / patches / 27_support_static_ip.patch
index fb99ba6..a3fbdb5 100644 (file)
@@ -6,40 +6,9 @@
 
 @DPATCH@
 
-Index: b/scripts/live
-===================================================================
---- a/scripts/live     2011-07-24 22:08:13.000000000 +0200
-+++ b/scripts/live     2011-07-24 22:08:14.000000000 +0200
-@@ -110,9 +110,8 @@
-                               ;;
-                       ethdevice=*)
--                              DEVICE="${ARGUMENT#ethdevice=}"
--                              ETHDEVICE="${DEVICE}"
--                              export DEVICE ETHDEVICE
-+                              ETHDEVICE="${ARGUMENT#ethdevice=}"
-+                              export ETHDEVICE
-                               ;;
-                       ethdevice-timeout=*)
-@@ -179,13 +178,9 @@
-                               ;;
-                       ip=*)
--                              STATICIP="${ARGUMENT#ip=}"
--
--                              if [ -z "${STATICIP}" ]
--                              then
--                                      STATICIP="frommedia"
--                              fi
--
-+                              # copy complete ip=args into staticip, and
-+                              # keep multiple uses.
-+                              STATICIP="${STATICIP} ${ARGUMENT}"
-                               export STATICIP
-                               ;;
-@@ -667,6 +662,24 @@
+--- a/scripts/live
++++ b/scripts/live
+@@ -294,6 +294,24 @@
        return 0
  }
  
@@ -64,7 +33,7 @@ Index: b/scripts/live
  do_netsetup ()
  {
        modprobe -q af_packet # For DHCP
-@@ -677,9 +690,19 @@
+@@ -304,9 +322,19 @@
        [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15
        echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration."
  
@@ -87,7 +56,7 @@ Index: b/scripts/live
  
  
        # support for Syslinux IPAPPEND parameter
-@@ -722,7 +745,7 @@
+@@ -349,7 +377,7 @@
  
                                if [ "$bootif_mac" = "$current_mac" ]
                                then
@@ -96,7 +65,7 @@ Index: b/scripts/live
                                        break
                                fi
                        fi
-@@ -734,12 +757,7 @@
+@@ -361,12 +389,7 @@
        # for *every* present network device (except for loopback of course)
        if [ -z "$ETHDEVICE" ] ; then
                echo "If you want to boot from a specific device use bootoption ethdevice=..."
@@ -110,7 +79,7 @@ Index: b/scripts/live
        fi
  
        # split args of ethdevice=eth0,eth1 into "eth0 eth1"
-@@ -747,38 +765,27 @@
+@@ -374,43 +397,34 @@
                devlist="$devlist $device"
        done
  
@@ -141,7 +110,9 @@ Index: b/scripts/live
 -                      export DEVICE="$dev"
 -                      break
 +              IPV4ADDR="0.0.0.0"
-+              . /tmp/net-${device}.conf
++              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
@@ -163,3 +134,40 @@ Index: b/scripts/live
  
        for interface in ${DEVICE}; do
                # source relevant ipconfig output
+               OLDHOSTNAME=${HOSTNAME}
+-              [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
++              [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf
+               [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
+               export HOSTNAME
+--- a/scripts/live-helpers
++++ b/scripts/live-helpers
+@@ -93,9 +93,8 @@
+                               ;;
+                       ethdevice=*)
+-                              DEVICE="${ARGUMENT#ethdevice=}"
+-                              ETHDEVICE="${DEVICE}"
+-                              export DEVICE ETHDEVICE
++                              ETHDEVICE="${ARGUMENT#ethdevice=}"
++                              export ETHDEVICE
+                               ;;
+                       ethdevice-timeout=*)
+@@ -162,13 +161,9 @@
+                               ;;
+                       ip=*)
+-                              STATICIP="${ARGUMENT#ip=}"
+-
+-                              if [ -z "${STATICIP}" ]
+-                              then
+-                                      STATICIP="frommedia"
+-                              fi
+-
++                              # copy complete ip=args into staticip, and
++                              # keep multiple uses.
++                              STATICIP="${STATICIP} ${ARGUMENT}"
+                               export STATICIP
+                               ;;