[2/2,archiso_pxe_common] Handle case where ip=dhcp

Message ID 20170310200106.6678-2-thurstylark@gmail.com
State New
Headers show
Series
  • [1/2,archiso_pxe_common] Add timeout to ipconfig call
Related show

Commit Message

Ian Li via arch-releng March 10, 2017, 8:01 p.m. UTC
From: David Thurstenson <thurstylark@gmail.com>

Signed-off-by: David Thurstenson <thurstylark@gmail.com>
---
 archiso/initcpio/hooks/archiso_pxe_common | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/archiso/initcpio/hooks/archiso_pxe_common b/archiso/initcpio/hooks/archiso_pxe_common
index 96a10c5..2380ca3 100644
--- a/archiso/initcpio/hooks/archiso_pxe_common
+++ b/archiso/initcpio/hooks/archiso_pxe_common
@@ -22,7 +22,11 @@  run_hook () {
                     break
                 fi
             done
-            ip="${ip}::${bootif_dev}"
+	    if [[ "${ip}" == "dhcp" ]]; then
+                ip=":::::${bootif_dev}:dhcp"
+	    else
+                ip="${ip}::${bootif_dev}"
+            fi
         fi
 
         # setup network and save some values