blob: 4de5272e2a85246b7d74aa36349bea15f6373729 [file] [log] [blame] [edit]
# Copyright 2019 The ChromiumOS Authors
# 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.
oom score never
# 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
exit 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