DIALOG " Your root volume is formatted in btrfs " --yesno "\nWould you like to create subvolumes in it? \n "00&& btrfs_subvolumes && touch /tmp/.btrfsroot
# Check if there are subvolumes already on the btrfs partition
if[[$(btrfs subvolume list /mnt | wc -l) -gt 1]]&& DIALOG " The volume has already subvolumes " --yesno "\nWould you like to mount them? \n "0 0;then
# Pre-existing subvolumes and user wants to mount them
mount_existing_subvols
else
# No subvolumes present. Make some new ones
DIALOG " Your root volume is formatted in btrfs " --yesno "\nWould you like to create subvolumes in it? \n "00&& btrfs_subvolumes && touch /tmp/.btrfsroot
DIALOG "Mount subvolume $subvol" --inputbox "\nInput mountpoint of the subvolume $subvol\nas it would appear in installed system\n(without prepending /mnt).\n"00"/" 2>/tmp/.mountp ||return0