From 71a40e88f6c226c3b920bbc05f823dad8aef2952 Mon Sep 17 00:00:00 2001 From: leimingsheng Date: Fri, 26 Dec 2025 16:28:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(master=20:=20nicsensor)=20update=20to=201.?= =?UTF-8?q?8.8=20get/set=E6=93=8D=E4=BD=9C=E6=94=AF=E6=8C=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AEfru=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nicsensor.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nicsensor.sh b/nicsensor.sh index a7bf982..aa1ce9f 100755 --- a/nicsensor.sh +++ b/nicsensor.sh @@ -1,5 +1,5 @@ #!/bin/sh -SCRIPT_VERSION="1.8.7" +SCRIPT_VERSION="1.8.8" # --------------------------------------------------------- # Project Feature Varible (Change if need) # --------------------------------------------------------- @@ -194,7 +194,7 @@ print_usage(){ echo " Function 5 - Settings" echo " 1) Command Format : ./nicsensor.sh [get/set] [property] [value]" echo " 2) Option Detail" - echo " - [property] : debug, n_detect, server" + echo " - [property] : debug, n_detect, server, fru_size" echo " - [value] : property's value" echo " 3) E.G. : ./nicsensor.sh set server 5280m7" echo " : ./nicsensor.sh set debug 1" @@ -278,6 +278,9 @@ get_set_properties(){ elif [ "$Param2" = "n_detect" ];then target_file="/tmp/ns_disabledetect" default_data=$DISABLE_DETECT + elif [ "$Param2" = "fru_size" ];then + target_file="/tmp/ns_frusize" + default_data=$fru_size else fmt_print "console" $ERROR "Invalid Property : $Param2" exit 1 @@ -310,6 +313,10 @@ load_properties_from_cache(){ if [ -e "/tmp/ns_disabledetect" ];then DISABLE_DETECT=`cat /tmp/ns_disabledetect` fi + + if [ -e "/tmp/ns_frusize" ];then + fru_size=`cat /tmp/ns_frusize` + fi } # According to boardid, parse server_type