OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 echo "Applying patch to init scripts." | 7 echo "Applying patch to init scripts." |
8 | 8 |
9 touch "${ROOT_FS_DIR}/root/.factory_test" | 9 touch "${ROOT_FS_DIR}/root/.factory_test" |
10 | 10 |
11 patch -d "${ROOT_FS_DIR}" -Np1 <<EOF | 11 patch -d "${ROOT_FS_DIR}" -Np1 <<EOF |
12 --- old/etc/init/ui.conf 2010-04-28 21:28:38.886069000 -0700 | 12 --- old/etc/init/ui.conf 2010-04-28 21:28:38.886069000 -0700 |
13 +++ new/etc/init/ui.conf 2010-04-28 21:29:42.676163000 -0700 | 13 +++ new/etc/init/ui.conf 2010-04-28 21:29:42.676163000 -0700 |
14 @@ -11 +11 @@ | 14 @@ -11 +11 @@ |
15 -start on stopping startup | 15 -start on stopping startup |
16 +start on never | 16 +start on never |
17 EOF | 17 EOF |
18 | 18 |
19 patch -d "${ROOT_FS_DIR}" -Np1 <<EOF | 19 patch -d "${ROOT_FS_DIR}" -Np1 <<EOF |
20 diff -Naur old/etc/init/boot-complete.conf new/etc/init/boot-complete.conf | 20 diff -Naur old/etc/init/boot-complete.conf new/etc/init/boot-complete.conf |
21 --- old/etc/init/boot-complete.conf 2010-07-21 11:22:30.000000000 +0800 | 21 --- old/etc/init/boot-complete.conf 2010-07-21 11:22:30.000000000 +0800 |
22 +++ new/etc/init/boot-complete.conf 2010-07-21 22:13:36.000000000 +0800 | 22 +++ new/etc/init/boot-complete.conf 2010-07-21 22:13:36.000000000 +0800 |
23 @@ -7 +7 @@ | 23 @@ -15 +15 @@ |
24 -start on login-prompt-ready | 24 -start on login-prompt-visible |
25 +start on started udev | 25 +start on started udev |
26 EOF | 26 EOF |
27 | 27 |
28 cat >"${ROOT_FS_DIR}/etc/init/factory.conf" <<EOF | 28 cat >"${ROOT_FS_DIR}/etc/init/factory.conf" <<EOF |
29 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 29 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
30 # Use of this source code is governed by a BSD-style license that can be | 30 # Use of this source code is governed by a BSD-style license that can be |
31 # found in the LICENSE file. | 31 # found in the LICENSE file. |
32 | 32 |
33 description "Chrome OS factory startup stub" | 33 description "Chrome OS factory startup stub" |
34 author "chromium-os-dev@googlegroups.com" | 34 author "chromium-os-dev@chromium.org" |
35 | 35 |
36 start on stopped udev-addon | 36 start on stopped udev-addon |
37 stop on starting halt or starting reboot | 37 stop on starting halt or starting reboot |
38 | 38 |
39 script | 39 script |
40 cd /usr/local/autotest | 40 cd /usr/local/autotest |
41 eval \$(./site_tests/suite_Factory/startx.sh) | 41 eval \$(./site_tests/suite_Factory/startx.sh) |
42 date >>/var/log/factory.log | 42 date >>/var/log/factory.log |
43 if [ ! -e factory_started ]; then | 43 if [ ! -e factory_started ]; then |
44 touch factory_started | 44 touch factory_started |
45 cp -f site_tests/suite_Factory/control . | 45 cp -f site_tests/suite_Factory/control . |
46 ./bin/autotest control >>/var/log/factory.log 2>&1 | 46 ./bin/autotest control >>/var/log/factory.log 2>&1 |
47 else | 47 else |
48 ./tools/autotest >>/var/log/factory.log 2>&1 | 48 ./tools/autotest >>/var/log/factory.log 2>&1 |
49 fi | 49 fi |
50 end script | 50 end script |
51 EOF | 51 EOF |
52 | 52 |
53 cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <<EOF | 53 cat >"${ROOT_FS_DIR}/etc/init/factorylog.conf" <<EOF |
54 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 54 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
55 # Use of this source code is governed by a BSD-style license that can be | 55 # Use of this source code is governed by a BSD-style license that can be |
56 # found in the LICENSE file. | 56 # found in the LICENSE file. |
57 | 57 |
| 58 description "Print Chrome OS factory log to tty3" |
| 59 author "chromium-os-dev@chromium.org" |
| 60 |
58 start on started factory | 61 start on started factory |
59 stop on starting halt or starting reboot | 62 stop on starting halt or starting reboot |
60 | 63 |
61 respawn | 64 respawn |
62 script | 65 script |
63 tail -n 48 -F /var/log/factory.log >/dev/tty3 | 66 tail -n 48 -F /var/log/factory.log >/dev/tty3 |
64 end script | 67 end script |
65 EOF | 68 EOF |
66 | 69 |
67 if [ -r "${ROOT_FS_DIR}/etc/init/chrontel.conf" ]; then | 70 if [ -r "${ROOT_FS_DIR}/etc/init/chrontel.conf" ]; then |
(...skipping 15 matching lines...) Expand all Loading... |
83 # Use of this source code is governed by a BSD-style license that can be | 86 # Use of this source code is governed by a BSD-style license that can be |
84 # found in the LICENSE file. | 87 # found in the LICENSE file. |
85 | 88 |
86 -start on starting ui | 89 -start on starting ui |
87 +start on starting factory | 90 +start on starting factory |
88 | 91 |
89 respawn | 92 respawn |
90 | 93 |
91 EOF | 94 EOF |
92 fi | 95 fi |
OLD | NEW |