blob: 7189bf8504646e1bada1f14d36c698c0e9d9e171 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Chrome OS factory pre hook before initiaization"
author "chromium-os-dev@chromium.org"
# For factory test to perform early initialization before reloading the upstart
# configuration. E.g. override the upstart configuration...
# Hint: ui.conf starts on "started boot-services", so this upstart job should
# always run before UI starts.
# Use "stopping startup" to make sure this task is executed before "startup"
# finished.
start on stopping startup and stopped cros-payloads
task
script
. /usr/share/cros/factory_utils.sh
if ! is_factory_mode; then
return 0
fi
/usr/local/factory/init/startup preinit
# This will trigger factory-init and wait until it finished.
initctl emit factory-init-event
end script