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.
TEST=System boots up properly.
Reviewed-by: Gaurav Shah <email@example.com>
Reviewed-by: Mattias Nissler <firstname.lastname@example.org>
Commit-Queue: Mattias Nissler <email@example.com>
Tested-by: Mattias Nissler <firstname.lastname@example.org>
diff --git a/system-services.conf b/system-services.conf
index 82691e1..c1ab97e 100644
@@ -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
+# * 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
@@ -6,8 +6,12 @@
# 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
# Some classes of devices are triggered by separate udev-trigger-*.conf