arch=$(uname -m | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
+# Check for Alibaba Cloud
+if echo "$dmi" | grep -q 'Manufacturer: Alibaba Cloud'; then
+ echo "alibaba_cloud"
+fi
+
# Check for VMware.
# cpuid check added by Chetan Loke.
# 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