mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 19:15:54 +02:00
AWS: Hypervisor UUID has been dropped from newer kernels
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -793,13 +793,6 @@ running_on_hypervisor() {
|
||||
running_on_ec2() {
|
||||
local uuid
|
||||
|
||||
# Check if the hypervisor UUID starts with ec2
|
||||
if [ -r "/sys/hypervisor/uuid" ]; then
|
||||
uuid=$(</sys/hypervisor/uuid)
|
||||
|
||||
[ "${uuid:0:3}" = "ec2" ] && return 0
|
||||
fi
|
||||
|
||||
# Check if the DMI product UUID starts with EC2
|
||||
if [ -r "/sys/devices/virtual/dmi/id/product_uuid" ]; then
|
||||
uuid=$(</sys/devices/virtual/dmi/id/product_uuid)
|
||||
|
||||
Reference in New Issue
Block a user