Explorar el Código

Merge pull request #71 from antonym/version_control

Version checker, enforce minimum netboot.xyz iPXE version 1.03
Antony Messerli hace 9 años
padre
commit
ea132c3e5a
Se han modificado 1 ficheros con 16 adiciones y 0 borrados
  1. 16 0
      src/menu.ipxe

+ 16 - 0
src/menu.ipxe

@@ -8,6 +8,22 @@ set cls:hex 1b:5b:4a  # ANSI clear screen sequence - "^[[J"
 set cls ${cls:string}
 :ignore_cls
 
+:version_check
+set latest_version 1.03
+echo ${cls}
+iseq ${version} ${latest_version} && goto version_up2date ||
+echo
+echo Updated version of netboot.xyz is available:
+echo
+echo Running version.....${version}
+echo Updated version.....${latest_version}
+echo
+echo Please download the latest version from netboot.xyz.
+echo
+echo Attempting to chain to latest version...
+chain --autofree http://${boot_domain}/ipxe/netboot.xyz-dhcp-undionly.kpxe ||
+:version_up2date
+
 isset ${arch} && goto skip_arch_detect ||
 cpuid --ext 29 && set arch x86_64 || set arch i386
 :skip_arch_detect