mpanighetti / install-or-defer

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

Deferred Update suddenly disappeared so LD unloaded #68

Closed master-vodawagner closed 2 years ago

master-vodawagner commented 2 years ago

An odd behaviour, I had 1 hour left to defer on installing 12.1 Beta 2 and suddenly it has detected no updates via softwareupdate binary and cleaned up the preferences :( However running the softwareupdate binary immediately after the LD unloaded shows the update

Mon Nov 15 16:11:58 GMT 2021: Starting install-or-defer.sh. Performing validation and error checking... Mon Nov 15 16:11:58 GMT 2021: Validation and error checking passed. Starting main process... Mon Nov 15 16:11:58 GMT 2021: Max deferral time undefined, or not set to a positive integer. Using default value. Mon Nov 15 16:11:58 GMT 2021: Maximum deferral time: 03d:00h:00m:00s Mon Nov 15 16:11:58 GMT 2021: Deferral deadline: 2021-11-15 17:25:29 Mon Nov 15 16:11:59 GMT 2021: Time remaining: 00d:01h:13m:31s Mon Nov 15 16:11:59 GMT 2021: Checking for pending system updates... Mon Nov 15 16:16:24 GMT 2021: Update requires a restart / shutdown... Mon Nov 15 16:16:24 GMT 2021: Updates found: macOS Monterey 12.1 Beta 2 Mon Nov 15 16:16:24 GMT 2021: Prompting to install updates now or defer... Mon Nov 15 16:16:34 GMT 2021: User clicked Defer after 00d:00h:00m:10s. Mon Nov 15 16:16:35 GMT 2021: Next prompt will appear after 2021-11-15 17:25:29. Mon Nov 15 16:21:35 GMT 2021: Starting install-or-defer.sh. Performing validation and error checking... Mon Nov 15 16:21:35 GMT 2021: Validation and error checking passed. Starting main process... Mon Nov 15 16:21:35 GMT 2021: Max deferral time undefined, or not set to a positive integer. Using default value. Mon Nov 15 16:21:35 GMT 2021: Maximum deferral time: 03d:00h:00m:00s Mon Nov 15 16:21:35 GMT 2021: Deferral deadline: 2021-11-15 17:25:29 Mon Nov 15 16:21:35 GMT 2021: Time remaining: 00d:01h:03m:54s Mon Nov 15 16:21:35 GMT 2021: Checking for pending system updates... Mon Nov 15 16:25:45 GMT 2021: No critical updates available. Mon Nov 15 16:25:45 GMT 2021: Updating Jamf Pro inventory... Mon Nov 15 16:26:37 GMT 2021: Killing any active jamfHelper notifications... Mon Nov 15 16:26:37 GMT 2021: Cleaning up stored plist values... Mon Nov 15 16:26:37 GMT 2021: Cleaning up script resources... Mon Nov 15 16:26:37 GMT 2021: Unloading install-or-defer LaunchDaemon... Mon Nov 15 16:26:37 GMT 2021: Script will end here. Mon Nov 15 16:26:37 GMT 2021: LaunchDaemon install-or-defer was unloaded...

MVW@iMac ~ % softwareupdate -l Software Update Tool

Finding available software Software Update found the following new or updated software:

Label: macOS Monterey 12.1 Beta 2-21C5031d Title: macOS Monterey 12.1 Beta 2, Version: 12.1, Size: 2052553K, Recommended: YES, Action: restart,

mpanighetti commented 2 years ago

This sounds similar to the behavior described in #54 so I'm going to close this as a duplicate, recommend following the other thread and attempting the described possible fix. If I can get confirmation that kickstarting softwareupdated results in more reliable update checks, I'll add it as a step in check_for_updates.