perf(master : nicsensor) 修正部分变量名称,增强脚本可读性
This commit is contained in:
parent
9642f77447
commit
ee381afcd6
12
nicsensor.sh
12
nicsensor.sh
@ -340,13 +340,13 @@ init_debuglog(){
|
|||||||
fmt_print "log" $INFO "Debug Mode : $DEBUG_MODE"
|
fmt_print "log" $INFO "Debug Mode : $DEBUG_MODE"
|
||||||
fmt_print "log" $INFO "Disable Detect : $DISABLE_DETECT"
|
fmt_print "log" $INFO "Disable Detect : $DISABLE_DETECT"
|
||||||
|
|
||||||
if [ "$nic_slot" = "detect" ];then
|
if [ "$Param1" = "detect" ];then
|
||||||
fmt_print "log" $INFO "Operation Type : i2c detect"
|
fmt_print "log" $INFO "Operation Type : i2c detect"
|
||||||
elif [ "$nic_slot" = "version" ];then
|
elif [ "$Param1" = "version" ];then
|
||||||
fmt_print "log" $INFO "Operation Type : get version"
|
fmt_print "log" $INFO "Operation Type : get version"
|
||||||
elif [ "$nic_slot" = "get" ];then
|
elif [ "$Param1" = "get" ];then
|
||||||
fmt_print "log" $INFO "Operation Type : get property value"
|
fmt_print "log" $INFO "Operation Type : get property value"
|
||||||
elif [ "$nic_slot" = "set" ];then
|
elif [ "$Param1" = "set" ];then
|
||||||
fmt_print "log" $INFO "Operation Type : set property value"
|
fmt_print "log" $INFO "Operation Type : set property value"
|
||||||
elif [ $param_num -lt 2 ];then
|
elif [ $param_num -lt 2 ];then
|
||||||
fmt_print "log" $INFO "Operation Type : help info"
|
fmt_print "log" $INFO "Operation Type : help info"
|
||||||
@ -419,7 +419,7 @@ pre_exec_hook(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# is param legel?
|
# is param legel?
|
||||||
if [ "$sensor_type" = "chip" ];then
|
if [ "$Param2" = "chip" ];then
|
||||||
if [ $param_num -le 3 ];then
|
if [ $param_num -le 3 ];then
|
||||||
fmt_print "console" $ERROR "Command Format illegal"
|
fmt_print "console" $ERROR "Command Format illegal"
|
||||||
echo "Command Format : ./nicsensor.sh [slot] chip [slave] [i2c_command]"
|
echo "Command Format : ./nicsensor.sh [slot] chip [slave] [i2c_command]"
|
||||||
@ -428,7 +428,7 @@ pre_exec_hook(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if the action is fru write, need pre-process fru data
|
# if the action is fru write, need pre-process fru data
|
||||||
if [ "$sensor_type" = "fru" ];then
|
if [ "$Param2" = "fru" ];then
|
||||||
if [ "$option_data" = "write" ];then
|
if [ "$option_data" = "write" ];then
|
||||||
fmt_print "log" $INFO "Opreation FRU Write"
|
fmt_print "log" $INFO "Opreation FRU Write"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user