blob: 84675d468543bf129fd6b2cf07adb35e019ffc78 [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/factory
TTY_VT=4
TTY="/dev/tty$TTY_VT"
(tput clear; echo -n "--- Starting Factory --- "; date) >$TTY
chvt $TTY_VT
sleep .3
"$FACTORY_BASE/bin/goofy_control" 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/bin/goofy_control" stop
) >$TTY
chvt $TTY_VT
end script
pre-stop script
pkill python
pkill X
end script