Explorar o código

Add static IP support for Alpine Linux

Works only with a single network card, because there is no way to
specify the network card by its MAC address.
Alexander E. Patrakov %!s(int64=5) %!d(string=hai) anos
pai
achega
ea42069e21
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/alpinelinux.ipxe

+ 3 - 1
src/alpinelinux.ipxe

@@ -3,6 +3,8 @@
 # Alpine Linux
 # https://alpinelinux.org
 
+isset ${dhcp-server} && set ipparam ip=dhcp || set ipparam ip=${ip}::${gateway}:${netmask}::eth0:none:${dns}
+
 goto ${menu}
 
 :alpinelinux
@@ -22,7 +24,7 @@ set base-url http://${alpinelinux_mirror}
 set dir ${alpinelinux_base_dir}/${alpine_version}/releases/${bootarch}/netboot
 set repo-url ${base-url}/${alpinelinux_base_dir}/${alpine_version}/main
 imgfree
-kernel ${base-url}/${dir}/vmlinuz-vanilla alpine_repo=${repo-url} modules=loop,squashfs modloop=${base-url}/${dir}/modloop-vanilla quiet nomodeset
+kernel ${base-url}/${dir}/vmlinuz-vanilla ${ipparam} alpine_repo=${repo-url} modules=loop,squashfs modloop=${base-url}/${dir}/modloop-vanilla quiet nomodeset
 initrd ${base-url}/${dir}/initramfs-vanilla
 echo
 echo MD5sums: