Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gets .kpxe and .efi boot endpoints of netboot.xyz, for use with dnsmasq.
#!/bin/sh
USER=dnsmasq:dnsmasq
MIRROR='https://boot.netboot.xyz/ipxe'
KPXE=netboot.xyz.kpxe
UEFI=netboot.xyz.efi
SHA2=netboot.xyz-sha256-checksums.txt
cd "$(dirname $0)"
rm -f "$KPXE" "$UEFI" "$SHA2"
wget "$MIRROR"/"$KPXE"
wget "$MIRROR"/"$UEFI"
wget "$MIRROR"/"$SHA2"
d="$(mktemp -d)"
for f in "$KPXE" "$UEFI"
do
grep "$f"$ "$SHA2" > "$d"/"$f".sha
sha256sum -c "$d"/"$f".sha || exit 1
done
rm -rf "$d"
chown "$USER" "$KPXE" "$UEFI" "$SHA2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.