mpanighetti / install-or-defer

A framework for prompting users of Jamf Pro-managed Macs to install Apple software updates.
Apache License 2.0
148 stars 28 forks source link

Update Install or Defer.sh #43

Closed just-some-tall-bloke closed 3 years ago

just-some-tall-bloke commented 4 years ago

Allows connectivity check to pass on corporate networks where ping is blocked

homebysix commented 4 years ago

Thanks! Do you know whether this should work on old macOS versions as well?

And do you mind using the same OpenDNS IP address instead of google.com, for consistency?

mpanighetti commented 4 years ago

Looks like macOS has included netcat in the default install as of 10.13, which is our minimum OS requirement, so that should work fine as a replacement.

EDIT: On a whim, I checked a 10.4 PowerPC Mac and netcat was there too. So I don't think we need to worry about its historical presence much.

just-some-tall-bloke commented 4 years ago

Using an IP is pretty limited outside of pinging it. Perhaps a reasonable compromise would be to switch google.com for apple.com, as that's the domain we're concerned about connecting to

mpanighetti commented 3 years ago

Would it be possible to test directly against Apple's software update servers (by hostname or IP), rather than testing google.com/apple.com/OpenDNS to try and determine whether the Mac can check for updates? We could also just move the testing phase to the actual update check, and exit with error if that check errors out for connectivity issues.

just-some-tall-bloke commented 3 years ago

We can indeed. Edited the URL to point to swscan.apple.com