Skip to content

Commit be30ae2

Browse files
armbian-install: add check for btrfs-progs
1 parent 54896e6 commit be30ae2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/bsp/common/usr/bin/armbian-install

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,17 @@ format_disk()
669669
[[ $? -ne 0 ]] && exit 10
670670
FilesystemChoosen=${FilesystemOptions[(2*$FilesystemChoices)-1]}
671671

672+
if [[ $FilesystemChoosen == *btrfs* ]] && ! command -v btrfs; then
673+
dialog --yes-label "Install" --no-label 'Deny' --title "$title" --backtitle "$backtitle" --yesno "\nThe btrfs-progs package is not installed.\n\nIt is required to format the root partition as btrfs. Install it now?" 10 75
674+
if [[ $? -eq 0 ]]; then
675+
apt update && apt install --yes btrfs-progs
676+
else
677+
dialog --title "$title" --backtitle "$backtitle" --colors --infobox\
678+
"\nCannot proceed without btrfs-progs" 5 60
679+
exit 10
680+
fi
681+
fi
682+
672683
dialog --title "$title" --backtitle "$backtitle" --infobox "\nFormating $1 to $FilesystemChoosen ... please wait." 5 60
673684
mkfs.${FilesystemChoosen} ${mkopts[$FilesystemChoosen]} "$1" >> $logfile 2>&1
674685
}

0 commit comments

Comments
 (0)