blob: 6c2194f29557a98768527765e37afd54690b4d84 [file] [log] [blame]
# 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 "Chrome OS factory startup stub"
author "chromium-os-dev@chromium.org"
start on started system-services
stop on stopping system-services
script
FACTORY_BASE=/usr/local/autotest/cros/factory
TTY_VT=4
TTY="/dev/tty$TTY_VT"
(tput clear; echo -n "--- Starting Factory --- "; date) >$TTY
chvt $TTY_VT
sleep .3
"$FACTORY_BASE/client" start >$TTY || true
# This should never happen, since goofy never returns. Kill X
# and display an error on $TTY
(echo -n "--- Factory Aborted --- "; date; "$FACTORY_BASE/client" stop) >$TTY
chvt $TTY_VT
end script
pre-stop script
pkill python
pkill X
end script