check target OS

This commit is contained in:
lassulus 2022-11-10 17:15:00 +01:00
parent ab86ca7927
commit 28809e0ef9

View File

@ -77,6 +77,11 @@ if [ ${is_kexec-n} != "y" ]; then
# TODO we probably need an architecture detection here
ssh_ << SSH
set -efux
os=\$(uname)
if [[ "\$os" != "Linux" ]]; then
echo "This script requires Linux as the operating system, but got \${os}" >&2
exit 1
fi
fetch(){
if command -v curl >/dev/null 2>&1; then
curl --fail -Ss -L "\$1"