浏览代码

Merge pull request #62 from antonym/netboot.xyz-custom

Add the ability to utilize custom menus (experimental)
Antony Messerli 9 年之前
父节点
当前提交
8b4960c578
共有 2 个文件被更改,包括 17 次插入1 次删除
  1. 6 1
      src/menu.ipxe
  2. 11 0
      src/utils.ipxe

+ 6 - 1
src/menu.ipxe

@@ -1,7 +1,6 @@
 #!ipxe
 
 :start
-
 chain --autofree boot.cfg ||
 
 iseq ${cls} serial && goto ignore_cls ||
@@ -31,6 +30,8 @@ item --gap Installers:
 item linux ${space} Linux Installers
 item bsd ${space} BSD Installers
 item freedos ${space} FreeDOS Installers
+isset ${github_user} && item --gap Custom Menu: ||
+isset ${github_user} && item nbxyz-custom ${space} ${github_user}'s Custom Menu ||
 item --gap Tools:
 item utils ${space} Utilities
 item shell ${space} iPXE shell
@@ -104,6 +105,10 @@ goto main_menu
 chain hypervisors.ipxe
 goto main_menu
 
+:nbxyz-custom
+chain https://raw.githubusercontent.com/${github_user}/netboot.xyz-custom/master/custom.ipxe || 
+goto main_menu
+
 :utils
 chain utils.ipxe
 goto main_menu

+ 11 - 0
src/utils.ipxe

@@ -14,6 +14,7 @@ item partition_wizard ${space} Partition Wizard
 item pogostick ${space} Pogostick - Offline Windows Password and Registry Editor
 item supergrub ${space} Super Grub2 Disk
 item --gap netboot.xyz tools:
+item nbxyz-custom ${space} Set Github User [user: ${github_user}]
 item testdistro ${space} Test Distribution ISO
 item testpr ${space} Test netboot.xyz branch
 choose --default ${menu} menu || goto utils_exit
@@ -73,6 +74,16 @@ goto utils_exit
 chain https://boot.netboot.xyz/utils/memtest86-5.01.bin && goto main_menu ||
 goto utils_exit
 
+:nbxyz-custom
+echo EXPERIMENTAL
+echo 
+echo Make sure you have a fork of https://github.com/antonym/netboot.xyz-custom.
+echo You can then customize your fork as needed and set up your own custom options.
+echo Once your username is set, a custom option will appear on the main menu.
+echo
+echo -n Please enter your Github username: ${} && read github_user
+goto utils_exit 
+
 :netbootcd
 kernel http://netbootcd.us/downloads/6.4.1/vmlinuz
 initrd http://netbootcd.us/downloads/6.4.1/nbinit4.gz