This is to follow up on the merge request from a couple of months ago. I think the original merge request can be rejected. I'd like to revise it, but would like to first get feedback on the approach used.
Again, the issue: umount $InstallDir would typically fail on OS X, e.g.
Unmounting install dir
umount(/Volumes/ESP): Resource busy -- try 'diskutil unmount'
Unmounting install dir
Volume EFI on disk0s1 unmounted
I'd rather contribute a quality fix for the issue: in particular, either check if diskutil is available before attempting to use it, or distinguish OS X from any other Darwin (e.g. PureDarwin), e.g. checking for and using sw_vers in addition to uname. (From what an IRC user told me, diskutil and other closed-source components are not to be included--at the same time, I don't know if umount works in their case.)
Would checking for diskutil suffice, or should the installer distinguish OS X from non-OS X Darwin (which might be useful for other installer purposes), or both? I might then be able to provide a revised fix.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is to follow up on the merge request from a couple of months ago. I think the original merge request can be rejected. I'd like to revise it, but would like to first get feedback on the approach used.
Again, the issue:
umount $InstallDir
would typically fail on OS X, e.g.As discussed on http://apple.stackexchange.com/a/129244 OS X suggests using
diskuitl unmount
instead ofumount
, which suceeds in unmounting the ESP:I'd rather contribute a quality fix for the issue: in particular, either check if
diskutil
is available before attempting to use it, or distinguish OS X from any other Darwin (e.g. PureDarwin), e.g. checking for and usingsw_vers
in addition touname
. (From what an IRC user told me,diskutil
and other closed-source components are not to be included--at the same time, I don't know ifumount
works in their case.)Would checking for
diskutil
suffice, or should the installer distinguish OS X from non-OS X Darwin (which might be useful for other installer purposes), or both? I might then be able to provide a revised fix.