Forráskód Böngészése

Add static IP support for Arch Linux

This unfortunately depends on the mirror responding properly when
the Host: header contains its IP address instead of the proper domain
name.
Alexander E. Patrakov 5 éve
szülő
commit
082abbb69c
1 módosított fájl, 14 hozzáadás és 1 törlés
  1. 14 1
      src/archlinux.ipxe

+ 14 - 1
src/archlinux.ipxe

@@ -3,6 +3,19 @@
 # Arch Linux Operating System
 # http://www.archlinux.org
 
+isset ${dhcp-server} || goto static_ip
+set ipparam BOOTIF=${netX/mac} ip=dhcp
+set real_archlinux_mirror ${archlinux_mirror}
+goto goto_menu
+
+:static_ip
+# Arch Linux cannot use DNS if booted with a static IP
+# See https://bugs.archlinux.org/task/63174
+# Remove this hack when the above bug is properly resolved
+nslookup real_archlinux_mirror ${archlinux_mirror}
+set ipparam BOOTIF=${netX/mac} ip=${ip}::${gateway}:${netmask}
+
+:goto_menu
 goto ${menu} ||
 
 :archlinux
@@ -18,7 +31,7 @@ goto boot
 :boot
 imgfree
 set dir ${archlinux_base_dir}/iso/${arch_version}/arch/boot
-set params initrd=archiso.img archiso_http_srv=http://${archlinux_mirror}/${archlinux_base_dir}/iso/${arch_version}/ archisobasedir=arch verify=y ip=dhcp net.ifnames=0 ${console}
+set params initrd=archiso.img archiso_http_srv=http://${real_archlinux_mirror}/${archlinux_base_dir}/iso/${arch_version}/ archisobasedir=arch verify=y ${ipparam} net.ifnames=0 ${console}
 kernel http://${archlinux_mirror}/${dir}/x86_64/vmlinuz ${params} initrd=archiso.img
 initrd http://${archlinux_mirror}/${dir}/x86_64/archiso.img
 echo