MLBZ521 / MacAdmin

A collection of scripts and tools for managing Apple Devices
MIT License
166 stars 33 forks source link

iMac unsupported models reporting as supporting Monterey #11

Closed ryan-baier-nih closed 2 years ago

ryan-baier-nih commented 2 years ago

According to this Apple article, I noticed some iMacs were reporting as compatible with macOS Monterey, but they are not. https://support.apple.com/en-us/HT212551

According to this, Monteray is only supported back to model iMac 16,1 Late 2015 models, which would exclude the Model iMac 15,1 (Late 2014 and Mid 2015)

I believe line 190 of your code should read: latestOSSupport=$( iMacModelCheck 7 10 13 13 14 16 )

ryan-baier-nih commented 2 years ago

Looking further into this, since Apple is supporting Big Sur on the iMac Model (14,4), I had to modify lines 117 and 118 to the below, changing the equal to greater than or equal and adding the or statement for major version 15:

elif [[ $modelMajorVersion -ge $5 && ( $(/usr/bin/bc <<< "${osMajorVersion} >= 11") -eq 1 || $(/usr/bin/bc <<< "${osMinorPatchVersion} >= 9") -eq 1 ) ]]; then
        if [[ $modelMinorVersion -ge 4 || $modelMajorVersion -eq 15 ]]; then
MLBZ521 commented 2 years ago

@ryan-baier-nih Sorry for the delay. I didn't get a notification about this and so I missed it...

Yes, you are correct, my last change incorrectly adjusted for Monterey support on iMac models.

I had accounted for the iMac14,4 models, but you are also correct, that the conditional logic was not setup correctly for it.

In addition to what you've mentioned, I noticed an issue with the Monterey logic for iMac models -- the minimum it actually supports is iMac16,2.

I have made adjustments in v1.12.1 (55efd75) that should address these.

There have been quite a few mistakes made in the last few versions, attempting to support Big Sur and Monterey in the logic structure I originally setup to do this. It was originally very simple, but has become much more complex in recent versions, unfortunately.

That said, it may finally be time for me to refractor this script....or possibly convert it to another language (e.g. Python). I've been considering this for the last couple years or so and I know if I put this in Python, it would be soooo much easier to code and support and I could make it even more accurate.....but I've hesitated since the shipped Python framework was deprecated (and has now finally been pulled from macOS) and the main reason I've contended with the idea of switching to Python is I fear it would make the EA unavailable to those that have been using it that are not shipping their own Python framework to their devices.

I'll leave this open for now to see if anyone has any comments on the above thought.

MLBZ521 commented 2 years ago

Ok, just pushed v1.12.2 (e2a7701) that reverts the 16,2 minimum as that is not accurate...

Apple's numerous pages are vague, misleading, or incorrect. Specifically, HT201634 shows that the iMac (Retina 5K, 27-inch, Mid 2015), Model Identifier: iMac15,1 still supports Monterey when it does not.

I may have figured out what happened, I think I incorrectly attributed #9 to Monterey and thus, did not correctly resolve the issue in v1.12.0 on 15656e6.

MLBZ521 commented 2 years ago

After thinking about refactoring this script the other night....I started to sketch it out....and went ahead with refactoring it. I have kept it as a bash script though, instead of converting it to Python.

Just finished it up this morning. See 391d345 for the latest revision and notes. Please note that I have updated the name based on the naming convention I am (and my org is) moving too.