更新 script/generate_bash_product_id.sh

This commit is contained in:
Pan Qiancheng 2025-06-09 14:01:36 +08:00
parent 1a680a3f81
commit 9d2c19d7a1
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ if [ ! -f "$UUID_FILE" ]; then
# 收集硬件信息 # 收集硬件信息
CPU_MODEL=$(lscpu | grep "Model name" | awk -F: '{print $2}' | sed 's/^ *//') CPU_MODEL=$(lscpu | grep "Model name" | awk -F: '{print $2}' | sed 's/^ *//')
ARCHITECTURE=$(uname -m) ARCHITECTURE=$(uname -m)
PCIE_DEVICES_RAW=$(timeout 3s lspci || true) PCIE_DEVICES_RAW=$(timeout 3s lspci -nn || true)
if [ -z "$CPU_MODEL" ] || [ -z "$ARCHITECTURE" ]; then if [ -z "$CPU_MODEL" ] || [ -z "$ARCHITECTURE" ]; then
echo "❌ 无法收集到CPU或系统架构信息注册终止" echo "❌ 无法收集到CPU或系统架构信息注册终止"