Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: src/scripts/mod_for_factory_scripts/200patchInitScript

Issue 1755012: Make modify-image-for-factory scripts more readable. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: Fix comments Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2
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
5 # found in the LICENSE file.
6
7 echo "Applying patch to init scripts."
8 pushd ${ROOT_FS_DIR}
9
10 patch -d ${ROOT_FS_DIR} -Np1 <<EOF
11 diff -Naur old/etc/init/dump-boot-stats.conf new/etc/init/dump-boot-stats.conf
12 --- old/etc/init/dump-boot-stats.conf 2010-04-05 21:33:11.000000000 -0700
13 +++ new/etc/init/dump-boot-stats.conf 2010-04-05 21:00:48.000000000 -0700
14 @@ -7,7 +7,7 @@
15 # when login-prompt-ready is received, grabs the current uptime and
16 # disk stats. Also sends uptime to metrics client for perf dashboard
17
18 -start on login-prompt-ready
19 +start on stopping startup
20
21 # This is run-once rather than a service.
22 task
23 EOF
24
25 cat > ${ROOT_FS_DIR}/etc/init/factory.conf <<EOF
26 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
27 # Use of this source code is governed by a BSD-style license that can be
28 # found in the LICENSE file.
29
30 description "Chrome OS factory startup stub"
31 author "chromium-os-dev@googlegroups.com"
32
33 start on stopping autotest
34
35 script
36
37 cd /usr/local/autotest
38 if [ ! -e factory_started ]; then
39 touch factory_started
40 date >> /var/log/factory.log
41 cp -f site_tests/suite_Factory/control.full control
42 ./bin/autotest control >> /var/log/factory.log 2>&1
43 fi
44 end script
45 EOF
46
47 cat > ${ROOT_FS_DIR}/etc/init/autotest.conf <<EOF
48 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
49 # Use of this source code is governed by a BSD-style license that can be
50 # found in the LICENSE file.
51
52 description "Chrome OS autotest startup stub"
53 author "chromium-os-dev@googlegroups.com"
54
55 start on started udev
56
57 script
58 # Sleep as the current upstart sequence gives no clear completion signal.
59 # TODO: investigate generating authoritative bootup finished event.
60 sleep 10
61 cd /usr/local/autotest
62 date >> /var/log/factory.log
63 ./tools/autotest >> /var/log/factory.log 2>&1
64 end script
65 EOF
66
67 cat > ${ROOT_FS_DIR}/etc/init/tty1.conf <<EOF
68 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
69 # Use of this source code is governed by a BSD-style license that can be
70 # found in the LICENSE file.
71
72 start on startup
73 stop on starting halt or starting reboot
74
75 respawn
76 script
77 cd /
78 /sbin/agetty 38400 tty1 linux -l /bin/bash -n
79 end script
80 EOF
81
82 patch -d ${ROOT_FS_DIR} -Np1 <<EOF
83 diff -Naur old/sbin/chromeos_startup new/sbin/chromeos_startup
84 --- old/sbin/chromeos_startup 2010-04-05 21:33:52.000000000 -0700
85 +++ new/sbin/chromeos_startup 2010-04-05 21:38:02.000000000 -0700
86 @@ -20,18 +20,12 @@
87
88 # Moblin trick: Disable blinking cursor. Without this a splash screen
89 # will show a distinct cursor shape even when the cursor is set to none.
90 -echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink
91 +# echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink
92
93 # Since we defer udev until later in the boot process, we pre-populate /dev
94 # with the set of devices needed for X and other early services to run.
95 cp -a -f /lib/chromiumos/devices/* /dev
96
97 -# Splash screen!
98 -if [ -x /usr/bin/ply-image ]
99 -then
100 - /usr/bin/ply-image /usr/share/chromeos-assets/images/login_splash.png &
101 -fi
102 -
103 mount -n -t tmpfs tmp /tmp
104 mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm
105 mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts
106 EOF
107
108 popd
OLDNEW
« no previous file with comments | « src/scripts/mod_for_factory_scripts/100disableUI ('k') | src/scripts/mod_for_factory_scripts/300modifyDescription » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698