chilcote / outset

Automatically process packages, profiles, and scripts during boot, login, or on demand.
572 stars 58 forks source link

Meta package for Outset and LaunchD #23

Closed erikng closed 8 years ago

erikng commented 9 years ago

Your recent comment just triggered my memory.

Perhaps the makefile (and official releases) should create a package for Outset and another package for the launchd, similar to munki. This will allow an admin to silently update Outset without requiring a reboot, while still properly rebooting for new machines.

The following situation happened to me recently:

  1. Imported FoundationPlist Outset update. Set item to not require a restart, thereby allowing me to silently update Outset on machines.
  2. Re-imaged a machine and ran munki bootstrap. Newest outset did not require a reboot, so it was installed and munki did not reboot. Outset's "every-boot" scripts did not run on machine.

I resolved this by chaining my outset 1.1 package to install only after outset 1.0 was installed (which still required a reboot).

chilcote commented 9 years ago

Confused. If you installed it on a brand new system, and did not load the launchd plists or reboot, then yeah, it's not gonna run. If they were two packages, how would that help in this scenario?

Re-installing shouldn't require rebooting... When you say that outset 1.0 "required a reboot" do you mean that's what was set in Munki by you, the admin?

I feel like I missing a vital piece of information here.

erikng commented 9 years ago

It's somewhat the way munki works.

  1. An item can only require one action: a logout, a reboot or none.
  2. An item that requires either a logout or a reboot cannot be installed silently.

This leads to the following:

  1. Strip reboot requirement from package, allowing munki to silently install. New machines no longer reboot.
  2. Keep reboot requirement, but cannot silently update Outset.

Munki will only attempt to install the latest version. I got around the packaging/munki issue by doing the following:

  1. Forcing a reboot for Outset 1.0
  2. Stripping reboot for Outset 1.1 (allowing me to install silently for current machines).
  3. Using munki's logic to make Outset 1.1 require Outset 1.0 (thereby forcing new machines to reboot after installing Outset).
chilcote commented 9 years ago

Gotcha.

chilcote commented 9 years ago

Can you try this installer: https://dl.dropboxusercontent.com/u/610494/outset-1.0.2.pkg

There is now a postinstall that will load the launchd plists, so you shouldn't need to reboot at all. If the plists are already loaded (e.g. an update install on a live system), then they won't reload.

erikng commented 8 years ago

Fixed via https://github.com/chilcote/outset/commit/a000e1d2a216e16f9a2acbf583740d18464f3db2