kc9wwh / macOSUpgrade

Workflow for doing in-place upgrades.
Other
418 stars 103 forks source link

FileVault status check fails with institutional recovery key #53

Closed jordan-hamilton closed 6 years ago

jordan-hamilton commented 6 years ago

Hi @kc9wwh,

When an institutional recovery key is installed, the variable fvStatus contains:

FileVault is On. FileVault master keychain appears to be installed.

This causes the first condition on line 335 to evaluate to false.

An alternative would be something like fvStatus=$( /usr/bin/fdesetup status | awk 'NR == 1' ) on line 170.

I can create a PR if you'd like.

Thanks for all you do!

--Jordan

timcarnold commented 6 years ago

I was able to resolve this by adding using head -1

If you have an institutional key it returns two lines. The first line returns the expected "FileVault is On". The second line returns "FileVault master keychain appears to be installed."

Your awk option would work too.

kc9wwh commented 6 years ago

Hey @jordan-hamilton and @timcarnold!

Thank you for reporting this issue. If either one of you can submit a Pull Request I’ll take a look and get this added to the master.

Thanks much for sharing!

Sent with GitHawk