Skip to content

Commit 462fdb1

Browse files
committed
Fix script variable error
1 parent 163574d commit 462fdb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/innovium/sonic-platform-modules-wistron/6512-32r/utils/sonic-qsfp-eeprom-monitor

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ bmc_update_dynamic()
244244
err=1
245245
fi
246246

247-
pwr_path="/sys/bus/i2c/devices/0-00"${port_map[$1]}"/power_mode"
247+
pwr_path="/sys/bus/i2c/devices/0-00"${port_map[$((port + 1))]}"/power_mode"
248248
pwr_mode=$(cat $pwr_path | awk '{printf $1}')
249249
if [ $pwr_mode -ne ${port_pre_mode[$port]} ]; then
250250
ipmitool raw 0x30 0x25 0x1 0xa0 0x0 93 $pwr_mode
@@ -283,7 +283,7 @@ bmc_update_dynamic()
283283
else
284284
err=1
285285
fi
286-
pwr_path="/sys/bus/i2c/devices/0-00"${port_map[$1]}"/power_mode"
286+
pwr_path="/sys/bus/i2c/devices/0-00"${port_map[$((port + 1))]}"/power_mode"
287287
pwr_mode=$(cat $pwr_path | awk '{printf $1}')
288288
if [ $pwr_mode -ne ${port_pre_mode[$port]} ]; then
289289
ipmitool raw 0x30 0x25 0x1 0xa0 0x0 26 $pwr_mode

0 commit comments

Comments
 (0)