Injecting a sequential job

Evan Huus eapache at gmail.com
Thu Mar 1 00:01:26 UTC 2012


On Wed, Feb 29, 2012 at 6:36 PM, Steve Langasek
<steve.langasek at ubuntu.com>wrote:

> On Wed, Feb 29, 2012 at 11:12:35PM +0100, Svein Seldal wrote:
>
> > Its an embedded product which has two distinct modes to run in:
> > production mode and normal application mode. Application mode is
> > standard rc runlevel as on a normal desktop installation. The
> > production mode is a special mode used in production where no normal
> > services should start except a few handpicked ones (static eth0,
> > ssh).
>
> You might want to take a look at what the friendly-recovery package in
> oneiric and precise does.  It intercepts the entire startup sequence (by
> having upstart emit a different initial startup event instead of the usual
> 'startup', starts only the things it needs, and continues startup only
> after
> it exits.  It includes handling for manually ensuring the filesystem is
> mounted (using mountall --no-events), without starting services that could
> be problematic later.
>
> It does start udev, but would not start dbus.


I thought of this, but wasn't sure how easy it would be in practice. If
certain core jobs need to have different start or stop conditions depending
on the boot path (app or production) then the condition logic could get
pretty messy. I'm not very familiar with how friendly-recovery handles this
though, so I might be over-complicating things.

 > Yes, I agree and I like this way, thanks. However (as nothing is
> > ever simple) this is on a Ubuntu Natty system, hence upstart 0.9.7,
> > so no override AFAIK.
>
> I don't know offhand if that's there or not in natty - Evan seems to have a
> clearer idea.
>

I just double-checked this: yes, the upstart in Natty supports override
files. It also supports a whole ton of other features (such as being
chroot-aware) that didn't land in an 'official' upstart release until
Oneric. More information at the Natty-Upstart Technical Overview:

https://wiki.ubuntu.com/NattyNarwhal/TechnicalOverviewUpstart

Cheers,
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20120229/ce5649da/attachment.html>


More information about the upstart-devel mailing list