diff --git a/nicsensor.sh b/nicsensor.sh index 1c135bf..71bd6c9 100755 --- a/nicsensor.sh +++ b/nicsensor.sh @@ -340,13 +340,13 @@ init_debuglog(){ fmt_print "log" $INFO "Debug Mode : $DEBUG_MODE" 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" - elif [ "$nic_slot" = "version" ];then + elif [ "$Param1" = "version" ];then 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" - elif [ "$nic_slot" = "set" ];then + elif [ "$Param1" = "set" ];then fmt_print "log" $INFO "Operation Type : set property value" elif [ $param_num -lt 2 ];then fmt_print "log" $INFO "Operation Type : help info" @@ -419,7 +419,7 @@ pre_exec_hook(){ fi # is param legel? - if [ "$sensor_type" = "chip" ];then + if [ "$Param2" = "chip" ];then if [ $param_num -le 3 ];then fmt_print "console" $ERROR "Command Format illegal" echo "Command Format : ./nicsensor.sh [slot] chip [slave] [i2c_command]" @@ -428,7 +428,7 @@ pre_exec_hook(){ fi # 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 fmt_print "log" $INFO "Opreation FRU Write"