stanford-rc / ibswinfo

Command-line tool to retrieve information and monitor Mellanox un-managed Infiniband switches
GNU General Public License v3.0
48 stars 8 forks source link

Setting nodename fails when the name is shorter than 5 characters #12

Closed kcgthb closed 1 year ago

kcgthb commented 1 year ago

When setting a switch description to a string 4 characters or shorter, the script fails to execute:

# ./ibswinfo.sh -d lid-801 -S test
Device: lid-801
  Current node description: Quantum Mellanox Technologies
  Set node description to : test
>> Confirm? (y/N) y
Setting new node description... 
# echo $?
1

Using a longer node description works as expected:

# ./ibswinfo.sh -d lid-801 -S test1
Device: lid-801
  Current node description: Quantum Mellanox Technologies
  Set node description to : test1
>> Confirm? (y/N) y
Setting new node description...
done!
# echo $?
0