aws: Match multi-digit version number in BIOS information
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 26 May 2021 10:31:24 +0000 (11:31 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 26 May 2021 10:31:24 +0000 (11:31 +0100)
See: https://listman.redhat.com/archives/virt-tools-list/2021-May/msg00011.html
Reported-by: Stuart Cooper
virt-what.in

index b7d266b..8021290 100644 (file)
@@ -413,7 +413,7 @@ fi
 
 # Check for AWS.
 # AWS on Xen.
-if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
+if echo "$dmi" | grep -Eq 'Version: [0-9]+\.[0-9]+\.amazon'; then
     echo aws
 # AWS on baremetal or KVM.
 elif echo "$dmi" | grep -q 'Vendor: Amazon EC2'; then