mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 16:32:59 +02:00
AWS: Ensure the product UUID is uppercase
Newer kernels seem to return this in lowercase format which makes the comparison to "EC2" fail. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -797,6 +797,9 @@ running_on_ec2() {
|
||||
if [ -r "/sys/devices/virtual/dmi/id/product_uuid" ]; then
|
||||
uuid=$(</sys/devices/virtual/dmi/id/product_uuid)
|
||||
|
||||
# Convert the UUID as uppercase
|
||||
uuid="${uuid^^}"
|
||||
|
||||
[ "${uuid:0:3}" = "EC2" ] && return 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user