kc9wwh / macOSUpgrade

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

Adding job control to address an issue where macOSUpgrade process quitting was also quitting child processes #169

Closed Hambeard closed 2 years ago

Hambeard commented 3 years ago

Added set -m to enable job control for the Application section of the script. The solution for this fix to issue #44 was proposed by fponcelin in https://github.com/kc9wwh/macOSUpgrade/issues/44#issuecomment-578631891:~:text=fponcelin%20commented%20on%2027%20Jan%202020

Reference for set builtin command https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html

kc9wwh commented 3 years ago

@Hambeard thanks for filling a PR! Have you tested this, if so on what macOS versions and to what target macOS versions? Just want to be sure this doesn't cause any additional issues even though it appears minor.

Hambeard commented 3 years ago

@kc9wwh absolutely understandable, I've only been able to test with 10.15.7 to 11.2 so far.

patgmac commented 3 years ago

I tested going from 10.14.6 to 11.2.3, no problems.

dannyhanes commented 2 years ago

Adding support for this one. Had an issue going from 10.15.7 to 11.6 and it would never actually perform the upgrade. Final log entry shown below.

Running a command as '"/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall" --agreetolicense --nointeraction --pidtosignal 36267 --forcequitapps >> /var/log/startosinstall.log 2>&1 &'...

I added the lines in the PR and it worked flawlessly.

staze commented 2 years ago

Can I ask why this change was backed ou/reverted?

Bdaskal commented 2 years ago

In my case I elected to keep the changes in my pull request separate from those in this pull request rather than duplicating the change. I have a fork that includes job control that otherwise matches the latest version here for my own usage (or anyone else's) until this PR is approved.

taniguti commented 2 years ago

@Hambeard Thank you for contribute this PR and sorry for my lazy response.

staze commented 2 years ago

Can confirm this worked with 10.14->11. Previously the install would just fail at some random percentage reported in startosinstall.log (somewhere between 0.8% and 26.8%). Added this change, and it immediately worked.

Thanks!