| # Copyright (c) 2011 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 "Record that system boot is complete" |
| author "chromium-os-dev@chromium.org" |
| |
| # Completion of this job is the key to starting the 'system-services' |
| # job. The job is also the official timestamp for boot time |
| # measurement. This job needs to run separately before |
| # 'system-services' because the amount of work that starts with |
| # 'system-services' could otherwise delay the 'bootstat' timestamp, |
| # and make boot time measurements less reliable. |
| |
| # Note, the 'start on' line is modified by chromeos-factoryinstall ebuild |
| # and factorytest-init ebuild. Please do not change it without also |
| # changing those references. |
| # TODO(jrbarnette) The external dependencies that edit this line should |
| # be eliminated. |
| start on login-prompt-visible |
| |
| script |
| # The login-prompt-visible signal is emitted every time the login |
| # screen is displayed. The check below makes sure boot stats are |
| # reported only once per boot. |
| if [ -n "$(bootstat_get_last boot-complete)" ]; then |
| exit 0 |
| fi |
| |
| bootstat boot-complete |
| end script |