Injecting a sequential job

Evan Huus eapache at gmail.com
Wed Feb 29 22:41:03 UTC 2012


On Wed, Feb 29, 2012 at 5:34 PM, Svein Seldal <sveinse at seldal.com> wrote:

>
> More specifically, if I have a job like this:
>
> start on starting dbus
> task
> script
>        # Main script here...
>
>        if [ "$production-mode" ]; then
>            initctl stop -n network-manager
>        fi
>
>        # Disable network-manager
> end script
>
> This does not work, as network-manager isn't started yet. NM depends on
> started dbus, which hasen't happened yet.
>
> Is it at all possible to tell upstart not to start a future job without
> having to reload its config?
>

As per my previous email (which probably hadn't arrived by the time you
sent this one), I think you're going about it sort of backwards. Your job
should emit an 'application-mode' event when not production mode. Then
network-manager (and anything else) should be adjusted to "start on
(default-conditions) and application-mode" using override files.

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


More information about the upstart-devel mailing list