mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
migration - btrfs and ext4 (format and tempmount) (#1706)
This commit is contained in:
@@ -287,18 +287,21 @@ if [ "$1" = "import-gui" ]; then
|
|||||||
OPTIONS+=(BTRFS "BTRFS & 3 Partitions (experimental)")
|
OPTIONS+=(BTRFS "BTRFS & 3 Partitions (experimental)")
|
||||||
|
|
||||||
useBlockchain=0
|
useBlockchain=0
|
||||||
|
hddFormat=None
|
||||||
CHOICE=$(whiptail --clear --title "Formatting ${hddCandidate}" --menu "" 10 52 3 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
CHOICE=$(whiptail --clear --title "Formatting ${hddCandidate}" --menu "" 10 52 3 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||||
clear
|
clear
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
EXT4)
|
EXT4)
|
||||||
|
hddFormat=ext4
|
||||||
echo "EXT4 FORMAT -->"
|
echo "EXT4 FORMAT -->"
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format ext4 ${hddCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format ext4 ${hddPartitionCandidate})
|
||||||
if [ ${#error} -gt 0 ]; then
|
if [ ${#error} -gt 0 ]; then
|
||||||
echo "FAIL --> ${error}"
|
echo "FAIL --> ${error}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
BTRFS)
|
BTRFS)
|
||||||
|
hddFormat=btrfs
|
||||||
echo "BTRFS FORMAT"
|
echo "BTRFS FORMAT"
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format btrfs ${hddCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format btrfs ${hddCandidate})
|
||||||
if [ ${#error} -gt 0 ]; then
|
if [ ${#error} -gt 0 ]; then
|
||||||
@@ -316,11 +319,19 @@ if [ "$1" = "import-gui" ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ ${useBlockchain} -eq 1 ]; then
|
||||||
|
if [ ${isBTRFS} -eq 1 ]; then
|
||||||
|
hddFormat=btrfs
|
||||||
|
else
|
||||||
|
hddFormat=ext4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# now temp mount the HDD/SSD
|
# now temp mount the HDD/SSD
|
||||||
if [ ${isBTRFS} -eq 0 ]; then
|
if [ "$hddFormat" == "btrfs" ]; then
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddPartitionCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddCandidate})
|
||||||
else
|
else
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddPartitionCandidate})
|
||||||
fi
|
fi
|
||||||
if [ ${#error} -gt 0 ]; then
|
if [ ${#error} -gt 0 ]; then
|
||||||
echo "FAIL: Was not able to temp mount the HDD/SSD --> ${error}"
|
echo "FAIL: Was not able to temp mount the HDD/SSD --> ${error}"
|
||||||
|
Reference in New Issue
Block a user