mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 13:40:51 +07:00
disks: rewrite usb mount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
7a2e2e2258
commit
dcf39e1daf
@ -314,6 +314,7 @@ function dtModel() {
|
||||
|
||||
function nondtModel() {
|
||||
MAXDISKS=0
|
||||
MAXINTDISKS=0
|
||||
USBPORTCFG=0
|
||||
ESATAPORTCFG=0
|
||||
INTERNALPORTCFG=0
|
||||
@ -329,6 +330,8 @@ function nondtModel() {
|
||||
([ ${IDX} -lt ${USBMINIDX} ] || [ "${hasUSB}" = "false" ]) && USBMINIDX=${IDX}
|
||||
([ ${IDX} -gt ${USBMAXIDX} ] || [ "${hasUSB}" = "false" ]) && USBMAXIDX=${IDX}
|
||||
hasUSB=true
|
||||
else
|
||||
[ $((${IDX} + 1)) -ge ${MAXINTDISKS} ] && MAXINTDISKS=$((${IDX} + 1))
|
||||
fi
|
||||
done
|
||||
# Define 6 is the minimum number of USB disks
|
||||
@ -339,7 +342,7 @@ function nondtModel() {
|
||||
[ $((${USBMAXIDX} - ${USBMINIDX})) -lt 6 ] && USBMAXIDX=$((${USBMINIDX} + 6))
|
||||
fi
|
||||
if [ "${2}" = "external" ]; then
|
||||
MAXDISKS=$((${MAXDISKS} - ${USBMINIDX}))
|
||||
MAXDISKS=${MAXINTDISKS}
|
||||
else
|
||||
[ $((${USBMAXIDX} + 1)) -gt ${MAXDISKS} ] && MAXDISKS=$((${USBMAXIDX} + 1))
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user