storagepanel: fix syntax

This commit is contained in:
AuxXxilium 2024-05-13 00:37:53 +02:00 committed by GitHub
parent 2cfc7c5eef
commit 2ea7fad73d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,10 +76,10 @@ if [ -z "${HDD_BAY}" ]; then
done
IDX=$((IDX + 1))
done
if [ ${IDX} -gt 24 ]
if [ ${IDX} -gt 24 ]; then
HDD_BAY="RACK_24_Bay"
fi
HDD_BAY=${HDD_BAY:-RACK_60_Bay}
HDD_BAY="${HDD_BAY:-RACK_60_Bay}"
fi
if [ -z "${SSD_BAY}" ]; then
@ -91,7 +91,7 @@ if [ -z "${SSD_BAY}" ]; then
done
IDX=$((IDX + 1))
done
SSD_BAY=${SSD_BAY:-1X8}
SSD_BAY="${SSD_BAY:-1X8}"
fi
[ ! -f "${FILE_GZ}.bak" ] && cp -f "${FILE_GZ}" "${FILE_GZ}.bak"
@ -103,4 +103,4 @@ NEW="driveShape:\"Mdot2-shape\",major:\"row\",rowDir:\"UD\",colDir:\"LR\",driveS
sed -i "s/\"${_UNIQUE}\",//g; s/,\"${_UNIQUE}\"//g; s/${HDD_BAY}:\[\"/${HDD_BAY}:\[\"${_UNIQUE}\",\"/g; s/M2X1:\[\"/M2X1:\[\"${_UNIQUE}\",\"/g; s/${OLD}/${NEW}/g" "${FILE_JS}"
gzip -c "${FILE_JS}" >"${FILE_GZ}"
exit 0
exit 0