mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
fix formatDisks
This commit is contained in:
parent
b68bb89762
commit
8bf38db4c5
@ -1706,12 +1706,12 @@ function formatDisks() {
|
|||||||
DIALOG --title "$(TEXT "Advanced")" \
|
DIALOG --title "$(TEXT "Advanced")" \
|
||||||
--yesno "$(TEXT "Warning:\nThis operation is irreversible. Please backup important data. Do you want to continue?")" 0 0
|
--yesno "$(TEXT "Warning:\nThis operation is irreversible. Please backup important data. Do you want to continue?")" 0 0
|
||||||
[ $? -ne 0 ] && return
|
[ $? -ne 0 ] && return
|
||||||
if [ $(ls /dev/md* 2>/dev/null | wc -l) -gt 0 ]; then
|
if [ $(ls /dev/md[0-9]* 2>/dev/null | wc -l) -gt 0 ]; then
|
||||||
DIALOG --title "$(TEXT "Advanced")" \
|
DIALOG --title "$(TEXT "Advanced")" \
|
||||||
--yesno "$(TEXT "Warning:\nThe current hds is in raid, do you still want to format them?")" 0 0
|
--yesno "$(TEXT "Warning:\nThe current hds is in raid, do you still want to format them?")" 0 0
|
||||||
[ $? -ne 0 ] && return
|
[ $? -ne 0 ] && return
|
||||||
for I in $(ls /dev/md* 2>/dev/null); do
|
for I in $(ls /dev/md[0-9]* 2>/dev/null); do
|
||||||
mdadm -S "${I}"
|
mdadm -S "${I}" >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
for I in ${RESP}; do
|
for I in ${RESP}; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user