start on starting gdm if gdm is present?

Joel Ebel jbebel at google.com
Wed May 26 23:08:36 BST 2010


I have an interesting problem I haven't figured out how to solve with
upstart.  We have an upstart task for our updater script.  We want it
to run before rc-sysinit and before gdm, but gdm isn't present on
servers, so you can't say starting gdm and starting rc-sysinit because
starting gdm will never happen.  If you say starting gdm or starting
rc-sysinit, then on desktops with gdm, the task gets run twice.
What's worse, it doesn't seem to block gdm anymore.  My guess is that
rc-sysinit fires first, so updater gets started then.  When gdm fires,
it sees the rc-sysinit prompted updater task is already running and
continues on starting gdm, rather than waiting for the existing task
to finish.  That seems bug-like, but it might just be my lack of
understanding.

Is there a right way to get an upstart task to block both rc-sysinit
and gdm, but not require gdm to be present, and not run twice if both
are present?  Currently it looks like I'll have to have a different
updater.conf for servers and workstations, but that seems far from
ideal.

Thanks,
Joel Ebel



More information about the upstart-devel mailing list