mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 13:40:51 +07:00
storagepanel: update (test)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
bd3e87699e
commit
85a9de0c3f
@ -71,14 +71,13 @@ if [ "${1}" = "-r" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
HDD_BAY="${1}"
|
[ -n "${1}" ] && HDD_BAY="$(echo "${HDD_BAY_LIST[@]}" | grep -iwo "${1}")" || HDD_BAY=""
|
||||||
if [ -n "${1}" ] && ! echo "${HDD_BAY_LIST[@]}" | grep -wq "${1}"; then
|
if [ -n "${1}" ] && [ -z "${HDD_BAY}" ]; then
|
||||||
echo "storagepanel: parameter 1 error"
|
echo "parameter 1 error"
|
||||||
HDD_BAY=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SSD_BAY="${2}"
|
SSD_BAY="$(echo "${2^^}" | sed 's/*/X/')"
|
||||||
if [ -n "${2}" ] && [ -z "$(echo "${2}" | sed -n '/^[0-9]\{1,2\}X[0-9]\{1,2\}$/p')" ]; then
|
if [ -n "${SSD_BAY}" ] && [ -z "$(echo "${SSD_BAY}" | sed -n '/^[0-9]\{1,2\}X[0-9]\{1,2\}$/p')" ]; then
|
||||||
echo "storagepanel: parameter 2 error"
|
echo "storagepanel: parameter 2 error"
|
||||||
SSD_BAY=""
|
SSD_BAY=""
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user