Просмотр исходного кода

Make deepin dynamic from endpoints.yml

Antony Messerli 4 лет назад
Родитель
Сommit
84c912436f
1 измененных файлов с 15 добавлено и 6 удалено
  1. 15 6
      roles/netbootxyz/templates/menu/live-deepin.ipxe.j2

+ 15 - 6
roles/netbootxyz/templates/menu/live-deepin.ipxe.j2

@@ -7,16 +7,25 @@ set os Deepin
 menu ${os} - Current Arch [ ${arch} ]
 iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
 item --gap ${os} Versions
-item 15 ${space} ${os} 15
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "Deepin" %}
+item {{ value.version }} ${space} ${os} {{ value.version }}
+{% endif %}
+{% endfor %}
 choose live_version || goto live_exit
 goto ${live_version}
 
-:15
-set squash_url ${live_endpoint}{{ endpoints["deepin-15-squash"].path }}filesystem.squashfs
-set kernel_url ${live_endpoint}{{ endpoints["deepin-15-squash"].path }}
-goto 15-boot
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "Deepin" %}
+:{{ value.version }}
+set squash_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+set kernel_url ${live_endpoint}{{ value.path }}
+goto boot
 
-:15-boot
+{% endif %}
+{% endfor %}
+
+:boot
 imgfree
 kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} union=overlay initrd=initrd ${cmdline}
 initrd ${kernel_url}initrd