mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 14:36:58 +02:00
ami: check that the disk GUID has been set
This commit is contained in:
parent
000a472310
commit
ae7e759544
@ -185,6 +185,20 @@ for host in ${ips[@]}; do
|
|||||||
done
|
done
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
|
||||||
|
echo "Checking disk GUID... "
|
||||||
|
for host in ${ips[@]}; do
|
||||||
|
if ! ssh -i "$key_file" -l core -o StrictHostKeyChecking=no "$host" \
|
||||||
|
sudo sgdisk --print /dev/xvda | \
|
||||||
|
grep "^Disk identifier" | \
|
||||||
|
grep -v 00000000-0000-0000-0000-000000000001
|
||||||
|
then
|
||||||
|
echo "disk guid unset on $host" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "OK"
|
||||||
|
|
||||||
|
|
||||||
echo -n "Cleaning up environment... "
|
echo -n "Cleaning up environment... "
|
||||||
ec2-terminate-instances $instances > /dev/null
|
ec2-terminate-instances $instances > /dev/null
|
||||||
while ! $ec2_cmd | grep INSTANCE | grep -q terminated
|
while ! $ec2_cmd | grep INSTANCE | grep -q terminated
|
||||||
|
Loading…
Reference in New Issue
Block a user