blob: 80aca65abcedadc72e9c11d48444f8ffcabcdf83 [file] [log] [blame]
# Copyright (c) 2013 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 startup stub"
author "chromium-os-dev@chromium.org"
# The start/stop timing should be the same (or earlier than) to ui.conf
start on started boot-services
stop on starting pre-shutdown and stopped ui
pre-start script
. /usr/share/cros/factory_utils.sh
if ! is_factory_mode; then
stop
fi
end script
script
# TODO(hungte) Remove the legacy support of 'goofy_control' when most systems
# have changed to the new init system (CL:328132).
if [ -d /usr/local/factory/init/main.d ]; then
exec /usr/local/factory/init/startup main
else
exec /usr/local/factory/bin/goofy_control start
fi
end script
post-stop script
. /usr/share/cros/factory_utils.sh
! is_factory_mode && return
# No 'stop' support for legacy goofy_control systems.
if [ -d /usr/local/factory/init/main.d ]; then
exec /usr/local/factory/init/startup stop
fi
end script