From f0b59b8f0aafb9a26aabb087c4c86759bf43758b Mon Sep 17 00:00:00 2001 From: Pan Qiancheng <1220204124@zust.edu.cn> Date: Mon, 9 Jun 2025 16:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20script/generate=5Fbash=5Fp?= =?UTF-8?q?roduct=5Fid.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/generate_bash_product_id.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)