From fa2dd93743e2bc981e37c9f10dc0798d01d9dc5b Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Thu, 24 Feb 2011 16:32:35 +0800 Subject: [PATCH] crosutils: fixing factory upstart script to allow stopping factory test ui. Developers may want to run their own factory test UI after finishing the Google official one, so the "factory" test should be stoppable. BUG=chrome-os-partner:2456 TEST=build a factory image, install and start factory testing UI, then switch to VT2, login and type: "initctl stop factory" the screen should switch to a virtual terminal (VT2) without hanging / reboot. Change-Id: I6a9d1c951d48d448f5c83c5f645ea531e8fd1499 Review URL: http://codereview.chromium.org/6567004 --- mod_for_factory_scripts/200patchInitScript | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mod_for_factory_scripts/200patchInitScript b/mod_for_factory_scripts/200patchInitScript index 5273054599..5c58b63929 100755 --- a/mod_for_factory_scripts/200patchInitScript +++ b/mod_for_factory_scripts/200patchInitScript @@ -48,6 +48,15 @@ else ./bin/autotest -t factory -c control >>/var/log/factory.log 2>&1 fi end script + +pre-stop script + pkill python + pkill X +end script + +post-stop script + chvt 2 +end script EOF cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <