Update scripts/alpine_boostrap.sh
This commit is contained in:
@@ -1,6 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Error: This script must be run as root" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "/var/lib/matchbox/assets" ]; then
|
||||
echo "Error: Folder /var/lib/matchbox/assets does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! curl -sSL -o /var/lib/matchbox/assets/vmlinuz https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/netboot/vmlinuz-lts; then
|
||||
echo "Error: Failed to download alpine vmlinuz." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! curl -sSL -o /var/lib/matchbox/assets/initramfs https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/netboot/initramfs-lts; then
|
||||
echo "Error: Failed to download alpine initramfs." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user