Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
Joseph Chilcote edited this page Jul 3, 2017 · 8 revisions

How does Outset work?

Outset is controlled by five launchd plists:

/Library/LaunchDaemons/com.github.outset.boot.plist
/Library/LaunchDaemons/com.github.outset.cleanup.plist
/Library/LaunchDaemons/com.github.outset.login-privileged.plist
/Library/LaunchAgents/com.github.outset.login.plist
/Library/LaunchAgents/com.github.outset.on-demand.plist

For each folder of items to process, if a file type is present, it always operates on:

  1. packages,
  2. then configuration profiles,
  3. and finally scripts.

What happens during boot?

The boot LaunchDaemon processes packages, profiles, and scripts during the boot sequence, and will either run once, or at every subsequent boot, depending on the directory in which the files are placed:

/usr/local/outset/boot-once/
/usr/local/outset/boot-every/

When the Mac boots, launchd will run /usr/local/outset/outset --boot which does the following:

  • Verifies that all working directories exist, and creates them if not.
  • If the network_wait setting is set to True (which is the default setting):
    • disables the loginwindow process
    • waits until the Mac has a valid IP address
  • Processes and deletes everything in /usr/local/outset/boot-once/
  • Loads the loginwindow.
  • Processes everything in /usr/local/outset/boot-every/
  • Creates the Outset preference in /usr/local/outset/share/ if it does not exist.

What happens during login?

The login LaunchAgent runs any scripts or profiles during user login, and will run either once, or at every subsequent login, depending on the directory in which the files are placed:

/usr/local/outset/login-once/
/usr/local/outset/login-every/

When the user logs in, launchd will run /usr/local/outset/outset --login which does the following:

  • If the user is not in the ignored_users array:
    • Processes everything in /usr/local/outset/login-once/ in the user context.
    • Logs the names of all login-once items to ~/Library/Preferences/com.github.outset.once.plist
    • Processes everything in /usr/local/outset/login-every/ in the user context.

Outset completes the login run by checking if there are any packages, profiles, or scripts in the the following directories:

/usr/local/outset/login-privileged-once/
/usr/local/outset/login-privileged-every/

If there are any files defined in these directories, Outset triggers an additional LaunchDaemon to run /usr/local/outset --login-privileged as root, which does the following:

  • If the user is not in the ignored_users array:
    • Processes everything in /usr/local/outset/login-privileged-once/ in the root context.
    • Logs the names of all login-privileged-once items to /usr/local/outset/share/com.github.outset.once.$UID.plist where $UID is the UID of the console user.
    • Processes everything in /usr/local/outset/login-privileged-every/ in the root context.

What order do jobs run in?

When processing items Outset handles each type (all pkgs, then profiles, then scripts) alphanumerically, meaning a file starting with 000 will be evaluated before one that starts with 0a, after which would be files like AAA that start with capitalized characters, then lowercase files aaa.

What happens during on-demand jobs?

The on-demand LaunchAgent and cleanup LaunchDaemon, respectively, process and remove scripts or profiles from the following directory immediately, in the user context, for any currently logged in user (for those using Fast User Switching, it will only run in the current GUI session, and will not run in any background sessions):

/usr/local/outset/on-demand/

When on-demand is initiated, launchd will run /usr/local/outset/outset --on-demand, which does the following in the current user session only:

  • Processes everything in /usr/local/outset/on-demand/
  • Deletes everything in /usr/local/outset/on-demand/

How can I remove Outset?

If you decide you don't want to use Outset any more, these commands should remove all traces of the tool:

sudo launchctl unload "/Library/LaunchDaemons/com.github.outset.boot.plist"
sudo rm -fv "/Library/LaunchDaemons/com.github.outset.boot.plist"
sudo launchctl unload "/Library/LaunchDaemons/com.github.outset.cleanup.plist"
sudo rm -fv "/Library/LaunchDaemons/com.github.outset.cleanup.plist"
sudo launchctl unload "/Library/LaunchAgents/com.github.outset.login.plist"
sudo rm -fv "/Library/LaunchAgents/com.github.outset.login.plist"
sudo launchctl unload "/Library/LaunchAgents/com.github.outset.on-demand.plist"
sudo rm -fv "/Library/LaunchAgents/com.github.outset.on-demand.plist"
sudo rm -rfv /usr/local/outset
sudo pkgutil --forget com.github.outset