storage: fix remap

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2023-12-02 15:45:24 +01:00
parent 3c86f5893d
commit c42716608a

View File

@ -110,10 +110,6 @@ function getmap() {
dialog --backtitle "$(backtitle)" --colors --title "Arc Disks" \
--msgbox "${TEXT}" 0 0
fi
# Compute PortMap Options
SATAPORTMAPMAX="$(awk '{print $1}' "${TMP_PATH}/drivesmax")"
SATAPORTMAP="$(awk '{print $1}' "${TMP_PATH}/drivescon")"
SATAREMAP="$(awk '{print $1}' "${TMP_PATH}/remap" | sed 's/.$//')"
# Check for Sata Boot
LASTDRIVE=0
while read -r LINE; do
@ -130,6 +126,10 @@ function getmap() {
LASTDRIVE=$((${LINE} + 1))
fi
done < <(cat "${TMP_PATH}/ports")
# Compute PortMap Options
SATAPORTMAPMAX=$(awk '{print $1}' "${TMP_PATH}/drivesmax")
SATAPORTMAP=$(awk '{print $1}' "${TMP_PATH}/drivescon")
SATAREMAP=$(awk '{print $1}' "${TMP_PATH}/remap" | sed 's/.$//')
# Show recommended Option to user
if [ ! -n "${SATAREMAP}" ]; then
REMAP1="*"