Guarantee udev processing is complete on started system-services

Change udev-trigger to be a task job so it needs to complete before the
started event for system-services gets emitted. Update documentation in
system-services to call this out.

BUG=chromium:358213
TEST=System boots up properly.

Change-Id: Ie078526d60b7c869f44e795d8a3c2f3073ddac0e
Reviewed-on: https://chromium-review.googlesource.com/198000
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Commit-Queue: Mattias Nissler <mnissler@chromium.org>
Tested-by: Mattias Nissler <mnissler@chromium.org>
diff --git a/system-services.conf b/system-services.conf
index 82691e1..c1ab97e 100644
--- a/system-services.conf
+++ b/system-services.conf
@@ -18,9 +18,12 @@
 # Jobs that normally terminate in a bounded time (i.e. don't use
 # 'respawn') should omit the 'stop on' stanza.
 #
-# Jobs that depend on system-services as described above can assume
-# that all services implied by 'boot-services' are available.  Jobs
-# must not make assumptions about whether a user is logged in.
+# Jobs that depend on system-services as described above can assume the
+# following:
+#   * All services implied by 'boot-services' are available.
+#   * If applicable, Chrome has been started successfully.
+#   * udev events for all devices present at boot are processed.
+# Jobs must not make assumptions about whether a user is logged in.
 #
 # Jobs that depend on system-services may fail to come up if Chrome
 # fails during boot; see the 'failsafe' job for an alternative to
diff --git a/udev-trigger.conf b/udev-trigger.conf
index 1a54f82..70bb731 100644
--- a/udev-trigger.conf
+++ b/udev-trigger.conf
@@ -6,8 +6,12 @@
 author          "chromium-os-dev@chromium.org"
 
 # We must run eventually even if the UI doesn't come up correctly,
-# because network configuration depends on this job.
+# because network configuration depends on this job. Because
+# system-services requires udev event processing to be completed before
+# it emits started, this job is declared a task job and thus indirectly
+# blocks system-services startup to complete.
 start on starting failsafe
+task
 
 script
   # Some classes of devices are triggered by separate udev-trigger-*.conf