+# Mount the partition the user specified with the --usedefault option
+MountDefaultTarget() {
+ InstallDir=/tmp/refind_install
+ mkdir -p $InstallDir
+ if [[ $OSName == 'Darwin' ]] ; then
+ mount -t msdos $TargetPart $InstallDir
+ elif [[ $OSName == 'Linux' ]] ; then
+ mount -t vfat $TargetPart $InstallDir
+ fi
+ if [[ $? != 0 ]] ; then
+ echo "Couldn't mount $TargetPart ! Aborting!"
+ rmdir $InstallDir
+ exit 1
+ fi
+ UnmountEsp=1
+} # MountDefaultTarget()