x86: preinit: use board_name on Sm Super Servers
authorPhilip Prindeville <philipp@redfish-solutions.com>
Mon, 30 Oct 2017 18:32:46 +0000 (12:32 -0600)
committerJo-Philipp Wich <jo@mein.io>
Thu, 4 Jan 2018 12:44:42 +0000 (13:44 +0100)
Supermicro puts "Super Server" into their product_name DMI value
for a whole slew of products, making this value about as useful
as not having been filled in at all.  Instead, fall back on the
board_name instead.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
target/linux/x86/base-files/lib/preinit/01_sysinfo

index 3c21c07615e31a0a4be5124418403e000bf31cf3..466c831e7e6c0d0a12bcbab8ad6f1cbb6e83abb3 100644 (file)
@@ -17,7 +17,14 @@ do_sysinfo_x86() {
 
        for file in product_name board_name; do
                product="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)"
-               [ -n "$product" ] && break
+               case "$vendor:$product" in
+               "Supermicro:Super Server")
+                       continue
+                       ;;
+               ?*:?*)
+                       break
+                       ;;
+               esac
        done
 
        [ -n "$vendor" -a -n "$product" ] || return