Sfoglia il codice sorgente

Drop older Voyager releases, make menu more dynamic

Antony Messerli 3 anni fa
parent
commit
0c960013b7
2 ha cambiato i file con 16 aggiunte e 59 eliminazioni
  1. 0 30
      endpoints.yml
  2. 16 29
      roles/netbootxyz/templates/menu/live-voyager.ipxe.j2

+ 0 - 30
endpoints.yml

@@ -292,36 +292,6 @@ endpoints:
     version: '6'
     flavor: default
     kernel: backbox-6-default-squash
-  voyager-bionic-squash:
-    path: /ubuntu-squash/releases/download/bionic-4abf1559/
-    files:
-    - filesystem.squashfs
-    - initrd
-    - vmlinuz
-    os: Voyager
-    version: bionic
-    flavor: bionic
-    kernel: voyager-bionic-squash
-  voyager-buster-squash:
-    path: /debian-squash/releases/download/buster-8be6d9f8/
-    files:
-    - filesystem.squashfs
-    - initrd
-    - vmlinuz
-    os: Voyager
-    version: buster
-    flavor: buster
-    kernel: voyager-buster-squash
-  voyager-eoan-squash:
-    path: /ubuntu-squash/releases/download/eoan-da5582fc/
-    files:
-    - filesystem.squashfs
-    - initrd
-    - vmlinuz
-    os: Voyager
-    version: eoan
-    flavor: eoan
-    kernel: voyager-eoan-squash
   kde-neon-user:
     path: /ubuntu-squash/releases/download/20210812-1129-92641c1f/
     files:

+ 16 - 29
roles/netbootxyz/templates/menu/live-voyager.ipxe.j2

@@ -7,44 +7,31 @@ set os Voyager Live
 menu ${os} - Current Arch [ ${arch} ]
 iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
 item --gap ${os} Versions
-item focal ${space} ${os} Focal
-item bionic ${space} ${os} Bionic
-item buster ${space} ${os} Buster
-item eoan ${space} ${os} Eoan
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "Voyager" %}
+item {{ value.version }} ${space} ${os} {{ value.version }}
+{% endif %}
+{% endfor %}
 choose live_version || goto live_exit
 goto ${live_version}
 
-:focal
-set squash_url ${live_endpoint}{{ endpoints["voyager-focal-squash"].path }}filesystem.squashfs
-set kernel_url ${live_endpoint}{{ endpoints["voyager-focal-squash"].path }}
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "Voyager" %}
+:{{ value.version }}
+set squash_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+set kernel_url ${live_endpoint}{{ value.path }}
 imgfree
+{% if 'ubuntu-squash' in value.path %}
 kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} {{ kernel_params }}
-initrd ${kernel_url}initrd
-boot
-
-:bionic
-set squash_url ${live_endpoint}{{ endpoints["voyager-bionic-squash"].path }}filesystem.squashfs
-set kernel_url ${live_endpoint}{{ endpoints["voyager-bionic-squash"].path }}
-imgfree
-kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} {{ kernel_params }}
-initrd ${kernel_url}initrd
-boot
-
-:buster
-set squash_url ${live_endpoint}{{ endpoints["voyager-buster-squash"].path }}filesystem.squashfs
-set kernel_url ${live_endpoint}{{ endpoints["voyager-buster-squash"].path }}
-imgfree
+{% endif %}
+{% if 'debian-squash' in value.path %}
 kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} {{ kernel_params }}
+{% endif %}
 initrd ${kernel_url}initrd
 boot
 
-:eoan
-set squash_url ${live_endpoint}{{ endpoints["voyager-eoan-squash"].path }}filesystem.squashfs
-set kernel_url ${live_endpoint}{{ endpoints["voyager-eoan-squash"].path }}
-imgfree
-kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} {{ kernel_params }}
-initrd ${kernel_url}initrd
-boot
+{% endif %}
+{% endfor %}
 
 :live_exit
 clear menu