Created
October 22, 2018 16:28
-
-
Save ThinGuy/e43a5a67584cc68b283b871058e80fb8 to your computer and use it in GitHub Desktop.
Determine if MAAS machine booted UEFI or BIOS (Linux)
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/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