arc-functions: add unmount to mount dsm pool feature

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-12-23 17:56:55 +01:00
parent d092bf87c8
commit dc51577bbb

View File

@@ -2204,9 +2204,18 @@ function mountDSM() {
umount "${I}" 2>/dev/null
mount ${I} "/mnt/DSM/${NAME}" -o ro
done
MSG="Storage pools are mounted under /mnt/DSM.\nPlease check them via ${IPCON}:7304."
MSG="Storage pools are mounted under /mnt/DSM.\nPlease check them via ${IPCON}:7304.\nIf you proceed, DSM Pool will be unmounted!"
dialog --backtitle "$(backtitle)" --title "Mount DSM Pool" \
--msgbox "${MSG}" 7 50
if [ -n "${VOLS}" ]; then
dialog --backtitle "$(backtitle)" --title "Mount DSM Pool" \
--yesno "Unmount all storage pools?" 5 30
[ $? -ne 0 ] && return
for I in ${VOLS}; do
umount "${I}" 2>/dev/null
done
rm -rf /mnt/DSM
fi
return
}