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
This commit is contained in:
Hung-Te Lin 2011-02-24 16:32:35 +08:00
parent 75ac2beb67
commit fa2dd93743

View File

@ -48,6 +48,15 @@ else
./bin/autotest -t factory -c control >>/var/log/factory.log 2>&1 ./bin/autotest -t factory -c control >>/var/log/factory.log 2>&1
fi fi
end script end script
pre-stop script
pkill python
pkill X
end script
post-stop script
chvt 2
end script
EOF EOF
cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <<EOF cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <<EOF