macOSSoftwareUpdates icon indicating copy to clipboard operation
macOSSoftwareUpdates copied to clipboard

Big sur not working as expected

Open mani2care opened this issue 5 years ago • 9 comments

In big sur i tried it's not working expected got just reboot only not yet updated.

ntsadmin@NTS-Mani Desktop % sudo ./Apple-Updater-with-deferal.sh No valid deferral count specified. Defaulting to 3 chances. Total chances for user to defer is: 3 No valid defer time found. Defaulting to 5 mins. Machine reboot timer is set to 5 minutes. No valid start day found. Defaulting policy to always on. JAMF Binary found at 9.81 or later location The current day of the week is monday The current policy status is 1 Policy is currently enabled or the Policy Start Day matches today. Restarts required equals 1 Current user is: ntsadmin User choose to defer This was user installation attempt 2 of 3. ntsadmin@NTS-Mani Desktop % sudo ./Apple-Updater-with-deferal.sh No valid deferral count specified. Defaulting to 3 chances. Total chances for user to defer is: 3 No valid defer time found. Defaulting to 5 mins. Machine reboot timer is set to 5 minutes. No valid start day found. Defaulting policy to always on. JAMF Binary found at 9.81 or later location The current day of the week is monday The current policy status is 1 Policy is currently enabled or the Policy Start Day matches today. Restarts required equals 1 Current user is: ntsadmin User choose to defer This was user installation attempt 3 of 3. ntsadmin@NTS-Mani Desktop % sudo ./Apple-Updater-with-deferal.sh Password: No valid deferral count specified. Defaulting to 3 chances. Total chances for user to defer is: 3 No valid defer time found. Defaulting to 5 mins. Machine reboot timer is set to 5 minutes. No valid start day found. Defaulting policy to always on. JAMF Binary found at 9.81 or later location The current day of the week is monday The current policy status is 1 Policy is currently enabled or the Policy Start Day matches today. Restarts required equals 1 Current user is: ntsadmin Forced installation of software updates happening. Retrieving inventory preferences from https://newscorp.jamfcloud.com/... Finding extension attributes... Locating package receipts... Locating hard drive information... Locating accounts... Locating applications... Searching path: /System/Applications Locating software updates... Locating plugins... Searching path: /Library/Internet Plug-Ins Locating printers... Searching path: /Library/Application Support Searching path: /Applications Locating hardware information (macOS 11.0.1)... Gathering application usage information... Submitting data to https://newscorp.jamfcloud.com/... <computer_id>8089</computer_id> User Choose to reboot immediately. No matching processes were found

mani2care avatar Feb 22 '21 16:02 mani2care

@trice81384

mani2care avatar Mar 16 '21 04:03 mani2care

@mani2care This script needs updates for Big Sur (which are coming) due to the need to add different switches to the software update command. It also won't work at all on M1s due to changes apple made in the softwareupdate binary.

tom-electric avatar Mar 17 '21 22:03 tom-electric

Find the changes for others as developed the same and added some changed

can you do compare and change the same

https://github.com/bp88/JSS-Scripts/blob/master/AppleSoftwareUpdate.sh

mani2care avatar Mar 29 '21 12:03 mani2care

@trice81384

mani2care avatar Mar 29 '21 12:03 mani2care

Change like this to one more step to support the Bigsur

updateCLI(){
    # Behavior of softwareupdate has changed in Big Sur
    # -ia seems to download updates and not actually install them.
    # Use -iaR for updates to be installed.
    # This also means that the script will restart/shutdown immediately
    if [[ "$OSMajorVersion" -ge 11 ]]; then
        /usr/sbin/softwareupdate -iaR --verbose 1>> "$ListOfSoftwareUpdates" 2>> "$ListOfSoftwareUpdates" &
    else
        # Install all software updates
        /usr/sbin/softwareupdate -ia --verbose 1>> "$ListOfSoftwareUpdates" 2>> "$ListOfSoftwareUpdates" &
    fi
    
    ## Get the Process ID of the last command run in the background ($!) and wait for it to complete (wait)
    # If you don't wait, the computer may take a restart action before updates are finished
    SUPID=$(echo "$!")
    
    wait $SUPID
    
    SU_EC=$?
    
    echo $SU_EC
    
    return $SU_EC
}

mani2care avatar Apr 16 '21 05:04 mani2care

@mani2care I'm debating how I want to handle some of these changes because as of now even with these additions they still don't allow the script to run on Apple silicon

trice81384 avatar May 12 '21 20:05 trice81384

then aware of the supportable for script how its working for the apple silicon https://github.com/grahampugh/erase-install

mani2care avatar Oct 28 '21 03:10 mani2care

https://github.com/bp88/JSS-Scripts

mani2care avatar Oct 28 '21 03:10 mani2care

@mani2care Try this new updated version

trice81384 avatar Dec 23 '21 16:12 trice81384