diff --git a/script/generate_bash_product_id.sh b/script/generate_bash_product_id.sh index 522e5c6..d612cbb 100644 --- a/script/generate_bash_product_id.sh +++ b/script/generate_bash_product_id.sh @@ -12,7 +12,7 @@ if [ ! -f "$UUID_FILE" ]; then chmod 644 "$UUID_FILE" # 收集硬件信息 - CPU_MODEL=$(lscpu | grep "Model name" | awk -F: '{print $2}' | sed 's/^ *//') + CPU_MODEL=$(lscpu | awk -F: '/^Model name:/ {gsub(/^ */, "", $2); print $2; exit}') ARCHITECTURE=$(uname -m) PCIE_DEVICES_RAW=$(timeout 3s lspci -nn || true)