No date
No date
- Adds
--catalog
to allow an easier way to select which software update catalog to use, rather than the defaults set ininstallinstallmacos.py
. Example:--catalog 10.15
will use the catalog for Darwin version 19,--catalog 11
will use Darwin version 20. This is to address omissions in the catalogs for older OSes (somewhat addresses #169, #160). - Allow for more lenient checks for Volume Ownership against the entered username (#177, thanks to @cvgs)
- Adds
--rebootdelay
option (Big Sur or later) (#193). - DEPNotify counts down the rebootdelay time.
- Adds
--fs
option which makes all the DEPNotify windows full screen (download, confirm, preparation). - User can dismiss the DEPNotify download and preparation windows if
--rebootdelay
is set to at least 10 seconds. - Multiple
--preinstall-command
arguments can now be supplied. These run immediately beforestartosinstall
is run. - Multiple
--postinstall-command
arguments can now be supplied. These run afterstartosinstall
has finished. - Checksums of
installinstallmacos.py
are now pinned to a tag of themacadmins-scripts
repo so that updates to the script don't break a particular version oferase-install.sh
from working. - Add a message about process Terminations, which some people were mistakenly believing to be errors.
- Fixed the actual killing of jamfHelper and caffeinate.
osascript
dialog windows now run as the user (addresses #198, thanks to @anewhouse).- Fixed an issue concerning the catalog for macOS High Sierra 10.13 which has an item without a version string listed, which was causing installinstallmacos.py to error out (addresses #169).
23.11.2021
- Determines free space better by checking free and purgeable space (partial fix for #152; thanks to Pico in MacAdmins Slack).
- Uses exit traps to clean up after all abnormal exits (fixes #140, #141; thanks to @ryangball).
- Adds
-nobrowse
tohdiutil
to prevent mounted images appearing on the desktop (thanks to @ryangball). - Allows 5 password attempts (fixes #159).
- Adds dialog to show how much time is left in the power check (#144; thanks to @dan-snelson).
- Some dialog changes, to replace the word "reinstall", which some people have found confusing, with "install" (addresses #149).
- Changed log location to the
$workdir
so that it persists after an upgrade, and also so it is wiped if using the--cleanup-after-use
option (fixes #161). - Remove check for membership of
staff
group for Apple Silicon Macs, since Volume Ownership is already checked it's not necessary, and was preventing non-admin AD users from proceeding (fixes #166). - Re-order some initial statements to ensure that the chosen $workdir has been created before DEPNotify is downloaded and the log file is determined (fixes #165).
- Some minot changes to the Dutch translation (addresses #164, thanks @Alitekawi).
27.10.2021
- Script now exits if an incorrect password is entered (partially fixes #136).
- Makefile uses
curl
to obtain DEPNotify.app without adding a quarantine bit (fixes #138). - Fixes for certain workflows involving the
--fetch-full-installer
(#140) and--pkg
(#141) options. - Fixed
--user
option, which was not reading in the given user (#142, thanks @chymb).
25.10.2021
- Removed the "0." from the version, as it's arbitrary and meaningless.
--seed
is now analogous to--seedprogram
.- New
--cleanup-after-use
option to delete the entire working directory after use (#131). --move
will now move the installer even when using--erase
or--reinstall
.--update
option now honours--beta
and--seed
options.- The
--depnotify
option will download DEPNotify.app if it's not already installed. - Fixed a problem with the
osascript
dialog when downloading an installer. - Makefile now includes
depnotify
andnopython
methods.depnotify
bundles DEPNotify.app into the package, and expectsDEPNotify.zip
in the root of the cloned repo - must be copied there.nopython
omits the relocatable-python framework (and also omits DEPNotify.app). - Updated SHA key of
installinstallmacos.py
to reflect merged in upstream changes (updated software catalog URL for macOS 12).
21.10.2021
- The package now includes a relocatable python installation (version 3.9.5) for use with
installinstallmacos.py
. This replaces the reliance on the macOS python2.7 distribution. - For standalone script runs, erase-install.sh will now check for an existing relocatable python or MacAdmins Python installation. If neither exists, and
--no-curl
is not set, the script will download and install the minimum MacAdmins Python signed package, for use withinstallinstallmacos.py
. If--no-curl
is set, the script will fall back to python 2. - If
installinstallmacos.py
is downloaded using curl, it is now checked against a defined SHA256 checksum. Note: this is calculated using the command:shasum -a 256 installinstallmacos.py | cut -d' ' -f1
. - Add download progress information to the DEPNotify bar (#127, thanks @andredb90, addresses #116).
- Rationalised version comparisons in the code from 3 to 1.
01.10.2021
- Add preparation progress information to the DEPNotify bar (#122, thanks @andredb90).
- SIP check only checks for partial SIP enablement (#110, thanks @anverhousseini).
- New
--preinstall-command
option to run a command prior to the beginning of thestartosinstall
run (thanks Fredrik Virding for the idea). - Fix build version comparisons (this affected macOS 11.6) (#124, thanks @boberito)
- Allow use of
--confirm
option for reinstallation (#123) - Improve version comparisons in
check_newer_available
function (should improve--update
reliability) - Fix erase or reinstall from a InstallAssistant package if it has not already been extracted with the
--move
option (#111).
20.07.2021
- Add French translation (thanks @Darkomen78).
- Fix version for which
--allowremoval
is set when doing a reinstall (thanks @anverhousseini). - Kill DEPNotify in places where jamfHelper is killed (#106, thanks @julienvs).
- Added '$script_name' variable - if you want to change the script name, the echo statements will reflect this value rather than 'erase-install'.
- Added
--clear-cache-only
option, which works in conjunction with--overwrite
or--update
to perform the removal of cached installers but then quit rather than carry on with any further workflow (#105). - Added a more verbose message that
--test-run
has been implemented (#93).
12.05.2021
- The Cancel button is now default in the Confirm dialog when not using jamfHelper or DEPNotify. Note that DEPNotify only offers one button so we cannot provide a straightforward Cancel button.
- The contents of the
README.md
have been replaced with a wiki.
07.05.2021
--depnotify
option. Uses DEPNotify instead of jamfHelper, if it is installed.--no-jamfhelper
option. Ignores the jamfHelper installation. Useful for testing theosascript
dialogs.
26.04.2021
- Another fix to the check that
--fetch-full-installer
can be used. - Edited Dutch localizations (thanks to Thijs Vught)
17.04.2021
- Fix for check that
--fetch-full-installer
can be used. - Dutch localizations (thanks to Thijs Vught)
07.04.2021
- Output from erase-install.sh is now written to
/var/log/erase-install.sh
in addition tostdout
. - Checks that the supplied user is an admin when performing
--eraseinstall
on M1, which appears to be a requirement (not forstartosinstall
without--eraseinstall
). If it is not, it promotes the user to admin. - Checks that the supplied user is a Volume Owner on M1 (rather than merely having a Secure Token)
- Runs
diskutil apfs updatePreboot /
prior tostartosinstall
to (experimentally) address a problem seen by some user accounts that were promoted usingPrivileges.app
. - Adds localization for osascript dialogs
10.03.2021
- Add
--check-power
option. Set this to check for AC power. Also--power-wait-limit
sets a time limit to wait for power (default is 60 seconds). - Merge in upstream changes to
installinstallmacos.py
. This improves download resumption.
03.03.2021
- Default minimum drive space now set to 45GB, but can now be overridden with the
--min-drive-space NN
option. - Fixed the
--confirm
option. - Improved the
--help
output with more recent keys.
20.01.2021
- For Catalina and earlier, do OS validation only as far as the minor release. This allows for the mismatch between advertised build and
DTSDKBuild
(fixes Issue #53). - Fix for when
VolumeName
is notMacintosh HD
or any two-word name (fixes Issue #58). - Added exit 1 code if script exists due to not successfully downloading an installer (fixes Issue #52).
- Increase munimum disk space required to 30GB, which aligns better Apple's recommendation for macOS Big Sur (see HT211238).
06.01.2021
- Testing moving
caffeinate
to the end of the script but using a second--pidtosignal
argument instartosinstall
to kill caffeinate. It is not documented that--pidtosignal
can be called multiple times, so this is experimental, but seems necessary on Big Sur as the "preparing upgrade" step is much longer than with previous OSs.
05.01.2021
- Added
--test-run
option which runs everything except thestartosinstall
command. Useful for testing new workflows. - Moved the prompt for user details for Apple Silicon Macs up the script so users don't get prompted later.
- No longer checks to see if the user is an administrator as this is apparently not a criterion - only Secure Token matters.
- Bug fix: remove alignment flags in the jamfHelper commands to solve a product issue with jamfHelper on Apple Silicon Macs.
15.12.2020
- New
--current-user
option to use the current logged in user forstartosinstall
authorisation on M1/DTK Macs. - New
--user
option to specify a user forstartosinstall
authorisation on M1/DTK Macs. - Now checks whether the specified user is an administrator.
- Now checks whether the specified user has a Secure Token.
- Now checks if the given password is correct.
- New
--no-fs
option for replacing the full-screen display with a utility window (for testing purposes). - Now quits
caffeinate
before beginningstartosinstall
. - Now correctly identifies Apple Silicon Mac Device IDs for compatibility checks.
- Now gets the installer version from
/Volumes/Shared Support/com_apple_MobileAsset_MacSoftwareUpdate/com_apple_MobileAsset_MacSoftwareUpdate.xml
as this is a more reliable build number than the one inInfo.plist
. - Now makes more reliable version comparisons using
BuildVersion
by splitting the check into more sections (AABCCDDE
instead ofAABCCCCD
). - Script version number is now displayed when running the script. I just have to remember to update it...
- added
--list-full-installers
option which runssoftwareupdate --list-full-installers
according to the seedprogram selected. test-erase-install.sh
script is now included in the installer package.
10.12.2020
- Bug fix:
--auto
was being incorrectly assigned when using--os
,--build
etc.
10.12.2020
- Added the
--pkg
option allowing the download of anInstallAssistant
package, utilising an update alresdy made to theinstallinstallmacos.py
fork. For Big Sur or greater only. This will probably need some more error checking. - Added the
--keep-pkg
option which prevents the deletion of the package if the--move
option is used to extract the package to/Applications
. By default, the package will be deleted on successful extraction. - Added the
--force-curl
and--no-curl
options, allowing the control of whether to downloadinstallinstallmacos.py
. This is in anticipation of a Makefile and package release oferase-install.sh
. - Added
Makefile
. This allows you to build a self-contained package containingerase-install.sh
andinstallinstallmacos.py
so that curl is not used during the run oferase-install.sh
to updateinstallinstallmacos.py
. This requiresmunkipkg
and expects to find thegrahampugh
fork ofinstallinstallmacos.py
in../macadmins-scripts
. Make sure you don't bundle in Greg Neagle's version ofinstallinstallmacos.py
inadvertently (or this script will fail). A package will be provided on GitHub for this and subsequent versions. Note thaterase-install.sh
is installed into/Library/Management/erase-install
. I deliberately have not puterase-install.sh
into the PATH. - Added the
--user
and--stdinpass
arguments when running on a Silicon Mac. Silicon Macs require an admin user and password to runstartosinstall
. - Now treats
10.x
or11
+ as major versions for OS comparisons. - Fix in
installinstallmacos.py
foros
comparisons failing where no Version is provided from the catalog.
20.11.2020
- Fixed comparison of build numbers when checking the installed build is newer than the build in the downloaded installer.
07.10.2020
- Version comparisons are now done based on
BuildVersion
instead ofProductVersion
so as not to rely on Major/Minor/Point comparisons (thanks to Greg Neagle's MacSysAdmin 2020 presentation about Big Sur for tips on this). - code clean up using ShellCheck.
31.07.2020
- Added
--pythonpath
option so that you can select a different python with which to runinstallinstallmacos.py
. Default is$(which python)
. installinstallmacos.py
now has a--warnings
option about whether to show the Notes/Warnings in the list output or not. This has been hard-coded intoerase-install.sh
to maintain current behaviour.
22.07.2020
- Fixed another small piece of failed logic around the check for whether there is already an installer which was finding other apps with
macOS
in the name. Now, only apps withInstall macOS*.app
will be found.
14.07.2020
- Fixed some failed logic around the check for whether there is already an installer in the
/Applications
folder which was erroneously also looking in other locations.
23.06.2020
- Parameters can now be supplied as
--argument value
as an alternative to--argument=value
to provide more consistency with the included tools (installinstallmacos.py
andsoftwareupdate
).
09.06.2020
- Adds
--allowremoval
option to thestartosinstall
command by default. This is an undocumented flag which is required under certain circumstances where there are backup files on the system disk.
06.05.2020
- Adds
--replace_invalid
option for the option to overwrite a cached installer if it is not valid for use with--erase
or--reinstall
. - Adds
--update
option for the option to overwrite a cached installer if a newer installer is available.
04.05.2020
- Adds
--preservecontainer
option for workflows that need to retain a container when performingeraseinstall
. - Adds additional flags to
caffeinate
to attempt to more robustly prevent device sleeping. - Fix for missing heading in the full screen display of the
--reinstall
option. - Added a test script
tests/test-erase-install.sh
for testing out functionality.
14.04.2020
- Use
--forcequitapps
when using the macOS Catalina installer, rather than just when running on a macOS Catalina client (issue #25).
13.02.2020
- Removed downloaded OS validity check for modes where the installer is not required for reinstall or eraseinstall, to prevent unnecessary exit failures.
- Fixed a problem preveting
--move
from working when overwriting a valid installer. - Other small bugfixes.
03.02.2020
- Restricted the add forcequitapps install_args option to macOS 10.15 or greater, as this is not functional with older versions (#35). Thanks to '@ahousseini' for the contribution.
22.01.2020
- Added the
--sameos
option, so you can have a single command which will always try to reinstall whatever macOS (major) version is currently installed on the host.
11.12.2019
- Removed check that a user is logged in before proceeding with startosinstall - apparently not necessary after all, and caused at least one user's workflow to break (#33).
27.11.2019
- Add a check that there is enough disk space before proceeding
- Added --forcequitapps argument for 10.15 and above
- Check that a user is logged in before proceeding with startosinstall
- Improved find commands when checking that there is a mounted installer
- Improved German descriptions for reinstallation
- Improved checks for successful downloads from the --fetch_full_installer option
Thanks to '@ahousseini' for various contributions to this release
15.11.2019
- Move a comment that states that --fetch-full-installer is available to the correct place (#31)
07.10.2019
- Added support for
softwareupdate --fetch-full-installer
andseedutil
for clients running macOS 10.15 or greater.
27.09.2019
- Fixed caffeinate (forgot to make it a background process)
- Added 'Confirm' option for erasing. Thanks to '@ryan-alectrona' for the contribution.
26.09.2019
- Added caffeinate to the script to prevent the computer going to sleep during long download phases etc.
12.07.2019
- Added
--beta
option. - Changed behaviour of
--os
,--version
and auto (i.e. no flag) options to get the latest rather than earliest valid build. - Removed
install-macos.sh
script. Useerase-install.sh
with--reinstall
option instead.
19.06.2019
- Added
--reinstall
option, which obsoletes theinstall-macos.sh
script.
16.04.2019
- Bug fix for empty extra packages folder.
Thanks to '@Avartharian' for contributions - Added
--catalogurl
and--seedprogram
options
02.04.2019
- Added localisation of Jamf Helper messages.
Thanks to '@ahousseini' for contributions - Added
--os
,--path
,--extras
,--list
options.
Thanks to '@mark lamont' for contributions
13.12.2018
- Bug fix for
--build
option, and for exiting gracefully when nothing is downloaded.
21.09.2018
- Added ability to specify a macOS version.
- Fixed the
--overwrite
flag. - Added ability to specify a build in the parameters, and we now clear out the cached content.
03.09.2018
- Additional and amended options for selecting non-standard builds.
09.07.2018
- Automatically selects a non-beta installer.
29.03.2018
- Initial version. Expects a manual choice of installer from
installinstallmacos.py
.