Update storage-test.sh

This commit is contained in:
2025-05-04 10:05:08 -05:00
parent 853637bb6a
commit b813aaeae4

View File

@@ -104,16 +104,18 @@ IO4kRandWrite=0
# Did the user give a folder ? # Did the user give a folder ?
ChosenPartition="" ChosenPartition=""
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
echo
Print_Style "Select a partition to test from:" "$YELLOW"
df=0; declare -A driveSel df=0; declare -A driveSel
echo "$(/bin/df -kTh | grep ext4)" | while IFS= read -r line ; do echo "$(/bin/df -kTh | grep ext4)" | while IFS= read -r line ; do
((df++)) ((df++))
path=$(echo $line | cut -d'%' -f2) path=$(echo $line | cut -d'%' -f2)
driveSel["${df}"] = "${path// }" driveSel["${df}"] = "${path// }"
echo "$df) ${path// }" Print_Style "$df) ${path// }" "$BLUE"
done done
exit 0 exit 0
cd / cd \
else else
if [ ! -d "$1" ]; then if [ ! -d "$1" ]; then
Print_Style "Your chosen partition (folder) does not exist! Provide a good one or run without parameters to check the rootfs" "$RED" Print_Style "Your chosen partition (folder) does not exist! Provide a good one or run without parameters to check the rootfs" "$RED"