Skip to content

How it Works

BigMac Admin edited this page Jun 19, 2024 · 7 revisions

Order of Operations

Once the primary script is run, the following sequence occurs:

  1. Checks for a valid configuration profile
    1. First checks if the --configuration command-line argument was used. If so, verifies this is a valid plist file and this will be used.
    2. Next checks if /usr/local/Baseline/BaselineConfig.plist exists and if so this will be used.
    3. Checks for an installed mobileconfig profile in the com.secondsonconsulting.baseline preference domain
    4. Baseline will timeout after 10 minutes if a profile cannot be found.
  2. If Installomator labels are defined in the configuration, then the latest version of Installomator is downloaded and installed.
    1. This will be downloaded from Github, unless you bundle your own version and place it in /usr/local/Baseline/Packages/Installomator.pkg
  3. The latest version of SwiftDialog is installed.
    1. This will be downloaded from Github, unless you bundle your own version and place it in /usr/local/Baseline/Packages/SwiftDialog.pkg
  4. Baseline then waits until an active end user is logged in on the device.
    1. This process does not have a timeout and will continue to wait until a user has logged in.
    2. This wait period is skipped if the --silent command-line argument has been used.
  5. Next, InitialScripts are processed.
    1. There is no built-in SwiftDialog component to InitialScripts. This is where you can customize your welcome experience to suit your use case by writing your own SwiftDialog script and calling it here.
  6. After InitialScripts complete, Baseline then looks again for a configuration file.
    1. The same priority of Command-Line argument, then Plist in /usr/local/Baseline/BaselineConfig.plist, and then MDM Configuration Profile is used.
    2. If your InitialScripts result in a new Plist being added to /usr/local/Baseline/BaselineConfig.plist, then Baseline will now use /usr/local/Baseline/BaselineConfig.plist for the remainder of it's run.
  7. Once InitialScripts are completed, a SwiftDialog progress list will show each additional item as it is processed.
  8. Installomator is used to process any labels defined in the configuration profile
  9. Any packages defined in the configuration profile are run.
  10. Any scripts defined in the configuration profile are run.
  11. Baseline will now wait for any items defined as WaitFor items (such as VPP, MDM, or munki installed items.) Default timeout 5 minutes before any items which haven't arrived are considered Failed.
  12. If a custom app icon has been configured for SwiftDialog, then it will be reinstalled in order to pickup this icon.
    1. This can be managed with the ReinstallDialog key set to true or false.
  13. Baseline deletes the LaunchDaemon, so that it is not loaded again after a restart.
  14. The entire directory /usr/local/Baseline is deleted.
    1. This can be managed with the CleanupAfterUse key set to true or false.
  15. The user is presented with a simple message indicating whether everything went smoothly or if there were errors. This message has a timer.
  16. After the timer the device forcibly restarts via shutdown -r now.
    1. This timer and restart can optionally be disabled with a profile key.
    2. Alternately, the LogOut key can be set to true in order to force a log out.

Additional Info

  • Baseline uses the --blurscreen SwiftDialog feature to prevent user access during the setup process.
    • This can be disabled by setting the BlurScreen key to false.
  • There is an optional "escape" key to close the Dialog windows using CMD+].
    • Using this escape key does not stop Baseline from running, it only closes the Dialog window.
  • Baseline runs Installomator labels with some default settings. See relevant pages for more information. These "defaults" can also be bypassed with the IgnoreDefaultInstallomatorOptions key set to true.