Skip to content
Bart Reardon edited this page May 20, 2023 · 10 revisions

Network Timeout

By default, during boot-once runs, Outset will wait for an active network connection before continuing. If that directory is populated, it would check every ten seconds for a valid network connection, timing out after a total of 180 seconds (three minutes) and skipping those items if no connection is successfully detected.

An "active network connection" in this context is actually what may be referred to as a 'minimum requirement' for network connectivity, as it could just be a link-local/169.254-prefixed IP address, meaning we've gotten past the confirmation of 'physical' and 'layer 2' network stack connectivity and the interface thinks it is nominally successfully connected to a switching device. Any IP address that's NOT 127.0.0.1 or 0.0.0.0 on any interface (when 'shelling out' to ifconfig) is enough to consider the network 'up'. Like the Munki project, Outset does not have special handling for whatever VLAN or DHCP-assigned address or network condition you may consider useful for your scripts/installations, so please take that into account as you consider the content of the rest of this page.

It will also attempt to disable the loginwindow (if its launchd jobs are able to load in time) while boot-once packages and scripts are being processed. This is to discourage users from logging in and potentially interrupting any boot-once jobs that are designated to be processed.

Now, this is great for small boot-once items, like running a series of defaults commands. However, if you are installing a large software package (i.e. Adobe CCP installers), or running a script that will take a long time to finish, the default user experience may not be what you want, and your users may complain that their Macs are "taking a long time to boot" or they may get impatient and shut down the Mac. (The MacAdmin community would recommend other ways to provide feedback to end users e.g. during DEP bootstrap with a tool like DEPNotify or letting Munki show progress during installs.)

Additionally, you may be working in a restrictive or specialized (lab) environment where the Macs are not supposed to detect an active network connection through the boot process.

Changing the Network Timeout

You can change the length of the timeout (from 3 minutes of 10-second loops checking for the "network up?" state) by either delivering a managed config profile with the applicable preference key, or write the key with defaults locally. The value written is in seconds.

Example:

sudo /usr/bin/defaults write io.macadmins.Outset network_timeout 240

If any of the "ignored_users" array, wait_for_network boolean True, or "override_login_once" dictionaries are populated, the plist will be updated with network_timeout reflecting the default 180 second integer value the first time Outset runs. It is not necessary to set the boolean value <true/> for the wait_for_network key if any of the others are present.

For example, if you want to increase this value to five minutes, use:

sudo /usr/bin/defaults write io.macadmins.Outset network_timeout 300

If you want to decrease this value to 20 seconds, use:

sudo /usr/bin/defaults write io.macadmins.Outset network_timeout 20

This will result in a preference file that will look similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>ignored_users</key>
    <array/>
    <key>network_timeout</key>
    <integer>20</integer>
    <key>wait_for_network</key>
    <true/>
  </dict>
</plist>

Removing the Network Timeout Requirement

If you don't want Outset to wait for a valid network connection at all (and you don't want it to suppress the loginwindow process while running scripts) you can deliver a readable preference file with the wait_for_network value set to boolean false, or use the commands as follow:

sudo /usr/bin/defaults write io.macadmins.Outset wait_for_network -bool false

This will result in a preference file that will look similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>ignored_users</key>
    <array/>
    <key>network_timeout</key>
    <integer>180</integer>
    <key>wait_for_network</key>
    <false/>
  </dict>
</plist>