Created
December 16, 2019 20:59
-
-
Save CosmicToast/b9a8736c49a7035ae7cd69019a5e5b25 to your computer and use it in GitHub Desktop.
Gets .kpxe and .efi boot endpoints of netboot.xyz, for use with dnsmasq.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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