Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion hyperctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ case $CONFIG in
IMGTYPE="raw"
ARCHIVE=".tar.gz"
;;
k3os)
DISTRO="k3os"
IMGVERS="v0.8.0"
IMAGE="k3os-rootfs-amd64.tar.gz"
IMAGEURL="https://github.com/rancher/k3os/releases/download/$IMGVERS"
SHA256FILE="sha256sum-amd64.txt"
KERNURL="https://github.com/rancher/k3os/releases/download/$IMGVERS"
KERNEL="k3os-vmlinuz-amd64"
INITRD="k3os-kernel-amd64.squashfs"
IMGTYPE="raw"
ARCHIVE=".tar.gz"
;;
esac

CIDR="10.10.0"
Expand Down Expand Up @@ -358,7 +370,7 @@ download-image() {

if ! [ -a $IMAGE.$IMGTYPE ]; then
curl $IMAGEURL/$IMAGE.$IMGTYPE$ARCHIVE -O
shasum -a 256 -c <(curl -s $IMAGEURL/$SHA256FILE | grep "$IMAGE.$IMGTYPE$ARCHIVE")
shasum -a 256 -c <(curl -s -L $IMAGEURL/$SHA256FILE | grep "$IMAGE.$IMGTYPE$ARCHIVE")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this a problem without the -L ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checksums URL responded with a redirect to the actual checksums file.


if [ "$ARCHIVE" = ".tar.gz" ]; then
tar xzf $IMAGE.$IMGTYPE$ARCHIVE
Expand Down