# 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 "\nFound subvolumes $(btrfs subvolume list /mnt| cut -d" " -f9)\n\nWould you like to mount them? \n "0 0;then
if[[$(btrfs subvolume list ${MOUNTPOINT}| wc -l) -gt 1]]&& DIALOG " The volume has already subvolumes " --yesno "\nFound subvolumes $(btrfs subvolume list ${MOUNTPOUNT}| cut -d" " -f9)\n\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 " Your root volume is formatted in btrfs " --yesno "\nWould you like to create subvolumes in it? \n "00&& btrfs_subvolumes