mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-09-27 09:35:43 -04:00
Adding generated pciids file
Adding static script from netbootxyz/pciids which is updated and generated weekly
This commit is contained in:
@@ -36,8 +36,7 @@ generate_checksums: true
|
||||
checksums_filename: "{{ site_name }}-sha256-checksums.txt"
|
||||
|
||||
# pciids
|
||||
generate_pciids: true
|
||||
pciids_url: https://raw.githubusercontent.com/pciutils/pciids/master/pci.ids
|
||||
pciids_url: https://raw.githubusercontent.com/netbootxyz/pciids/master/pciids.ipxe
|
||||
|
||||
# bootloader options
|
||||
generate_disks: true
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Used for processing pci.ids into ipxe format
|
||||
# https://raw.githubusercontent.com/pciutils/pciids/master/pci.ids
|
||||
|
||||
if [[ ! -n "$1" || ! -n "$2" ]]; then
|
||||
echo "Please set PCIIDS file location and PCIIDS output file location..."
|
||||
echo "pciids_gen pci.ids pciids.ipxe"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PCIIDS_FILE=$1
|
||||
PCIIDS_IPXE=$2
|
||||
|
||||
awk ' \
|
||||
BEGIN { \
|
||||
print "#!ipxe\ngoto ${vendor}${device} || goto ${vendor} || exit" \
|
||||
} \
|
||||
/^[0-9a-f]{4}/ { \
|
||||
vendor=substr($1,1,4); \
|
||||
printf ":%s\nset ven %s\nexit\n", vendor, substr($0,7) \
|
||||
} \
|
||||
/^\t[0-9a-f]{4}/ { \
|
||||
printf ":%s%s\nset dev %s\ngoto %s\n", \
|
||||
vendor, substr($0, 2, 4), substr($0, 8), vendor \
|
||||
} \
|
||||
' ${PCIIDS_FILE} > ${PCIIDS_IPXE}
|
||||
@@ -52,4 +52,9 @@
|
||||
with_filetree: "templates/menu/"
|
||||
when: item.state == "file"
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Retrieve pciids.ipxe
|
||||
get_url:
|
||||
url: "{{ pciids_url }}"
|
||||
dest: "{{ netbootxyz_root }}/pciids.ipxe"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
- name: Retrieve pci.ids
|
||||
get_url:
|
||||
url: "{{ pciids_url }}"
|
||||
dest: "{{ netbootxyz_root }}/pci.ids"
|
||||
|
||||
- name: Copy pciids_gen script to source dir
|
||||
copy:
|
||||
src: pciids_gen
|
||||
dest: "{{ netbootxyz_root }}/pciids_gen"
|
||||
mode: 0744
|
||||
|
||||
- name: Convert pci.ids to pciids.ipxe
|
||||
shell: |
|
||||
./pciids_gen pci.ids pciids.ipxe
|
||||
args:
|
||||
chdir: "{{ netbootxyz_root }}"
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Cleanup of files no longer needed
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "{{ netbootxyz_root }}/pciids_gen"
|
||||
- "{{ netbootxyz_root }}/pci.ids"
|
||||
@@ -3,10 +3,6 @@
|
||||
when:
|
||||
- generate_menus | default(true) | bool
|
||||
|
||||
- include: generate_pciids.yml
|
||||
when:
|
||||
- generate_pciids | default(true) | bool
|
||||
|
||||
- include: generate_menus_custom.yml
|
||||
when:
|
||||
- custom_generate_menus | default(false) | bool
|
||||
|
||||
Reference in New Issue
Block a user