Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Created October 22, 2018 16:28
Show Gist options
  • Save ThinGuy/e43a5a67584cc68b283b871058e80fb8 to your computer and use it in GitHub Desktop.
Save ThinGuy/e43a5a67584cc68b283b871058e80fb8 to your computer and use it in GitHub Desktop.
Determine if MAAS machine booted UEFI or BIOS (Linux)
#!/bin/bash
command -v jq &>/dev/null || sudo apt install jq -yqq
(maas admin machines read|jq -r '.[]|select(.status_name=="Deployed").hostname')| \
xargs -n1 -P0 bash -c 'ssh $0 '"'"'printf "$HOSTNAME: " && [[ -d /sys/firmware/efi ]] && echo UEFI || echo BIOS'"'"''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment