refactor(router info): improve router model recognition accuracy

update get_router_name function to read both GL-iNet原厂硬件信息和OpenWrt系统信息,组合获取更准确的机型名称
This commit is contained in:
2026-08-06 15:54:09 +08:00
parent 03512c5583
commit 669ac88b6d
2 changed files with 15 additions and 2 deletions

View File

@@ -23,7 +23,13 @@ third_party_source="https://istore.linkease.com/repo/all/nas_luci"
# 路由器信息获取
# ============================================================================
get_router_name() {
model_info=$(cat /tmp/sysinfo/model)
model_info=""
if [ -f /proc/gl-hw-info/model ]; then
model_info=$(cat /proc/gl-hw-info/model)
fi
if [ -f /tmp/sysinfo/model ]; then
model_info="$model_info $(cat /tmp/sysinfo/model)"
fi
echo "$model_info"
}