Chromium Code Reviews| 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 pushd ${ROOT_FS_DIR} | 8 pushd ${ROOT_FS_DIR} | 
| 9 | 9 | 
| 10 patch -d ${ROOT_FS_DIR} -Np1 <<EOF | 10 patch -d ${ROOT_FS_DIR} -Np1 <<EOF | 
| 11 --- old/etc/init/ui.conf 2010-04-28 21:28:38.886069000 -0700 | |
| 12 +++ new/etc/init/ui.conf 2010-04-28 21:29:42.676163000 -0700 | |
| 13 @@ -5,7 +5,8 @@ | |
| 14 description "Chrome OS user interface" | |
| 15 author "chromium-os-dev@googlegroups.com" | |
| 16 | |
| 17 -start on stopping startup | |
| 18 +# start on stopping startup | |
| 
 
Tom Wai-Hong Tam
2010/04/30 02:45:30
I don't think it's necessary to keep it as comment
 
 | |
| 19 +start on never | |
| 
 
kmixter1
2010/04/30 19:20:12
Isn't having no start on stanza equivalent?
 
Nick Sanders
2010/05/04 03:41:26
Not sure, but this makes it clear on first glance
 
 | |
| 20 stop on starting halt or starting reboot | |
| 21 | |
| 22 respawn | |
| 23 EOF | |
| 24 | |
| 25 patch -d ${ROOT_FS_DIR} -Np1 <<EOF | |
| 11 diff -Naur old/etc/init/dump-boot-stats.conf new/etc/init/dump-boot-stats.conf | 26 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 | 27 --- old/etc/init/dump-boot-stats.conf» 2010-04-28 21:35:33.785340000 -0700 | 
| 13 +++ new/etc/init/dump-boot-stats.conf» 2010-04-05 21:00:48.000000000 -0700 | 28 +++ new/etc/init/dump-boot-stats.conf» 2010-04-28 21:36:28.819984000 -0700 | 
| 14 @@ -7,7 +7,7 @@ | 29 @@ -7,7 +7,8 @@ | 
| 15 # when login-prompt-ready is received, grabs the current uptime and | 30 # when login-prompt-ready is received, grabs the current uptime and | 
| 16 # disk stats. Also sends uptime to metrics client for perf dashboard | 31 # disk stats. Also sends uptime to metrics client for perf dashboard | 
| 17 | 32 | 
| 18 -start on login-prompt-ready | 33 -start on login-prompt-ready | 
| 34 +# start on login-prompt-ready | |
| 
 
Tom Wai-Hong Tam
2010/04/30 02:45:30
Same as above.
 
 | |
| 19 +start on stopping startup | 35 +start on stopping startup | 
| 20 | 36 | 
| 21 # This is run-once rather than a service. | 37 # This is run-once rather than a service. | 
| 22 task | 38 task | 
| 23 EOF | 39 EOF | 
| 24 | 40 | 
| 25 cat > ${ROOT_FS_DIR}/etc/init/factory.conf <<EOF | 41 cat > ${ROOT_FS_DIR}/etc/init/factory.conf <<EOF | 
| 26 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 42 # 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 | 43 # Use of this source code is governed by a BSD-style license that can be | 
| 28 # found in the LICENSE file. | 44 # found in the LICENSE file. | 
| 29 | 45 | 
| 30 description "Chrome OS factory startup stub" | 46 description "Chrome OS factory startup stub" | 
| 31 author "chromium-os-dev@googlegroups.com" | 47 author "chromium-os-dev@googlegroups.com" | 
| 32 | 48 | 
| 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 | 49 start on started udev | 
| 56 | 50 | 
| 57 script | 51 script | 
| 58 # Sleep as the current upstart sequence gives no clear completion signal. | 52 | 
| 59 # TODO: investigate generating authoritative bootup finished event. | |
| 60 sleep 10 | |
| 61 cd /usr/local/autotest | 53 cd /usr/local/autotest | 
| 62 date >> /var/log/factory.log | 54 date >> /var/log/factory.log | 
| 63 ./tools/autotest >> /var/log/factory.log 2>&1 | 55 if [ ! -e factory_started ]; then | 
| 56 touch factory_started | |
| 57 cp -f site_tests/suite_Factory/control.full control | |
| 58 ./bin/autotest control >> /var/log/factory.log 2>&1 | |
| 59 else | |
| 60 ./tools/autotest >> /var/log/factory.log 2>&1 | |
| 61 fi | |
| 64 end script | 62 end script | 
| 65 EOF | 63 EOF | 
| 66 | 64 | 
| 67 cat > ${ROOT_FS_DIR}/etc/init/tty1.conf <<EOF | 65 cat > ${ROOT_FS_DIR}/etc/init/factorylog.conf <<EOF | 
| 68 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 66 # 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 | 67 # Use of this source code is governed by a BSD-style license that can be | 
| 70 # found in the LICENSE file. | 68 # found in the LICENSE file. | 
| 71 | 69 | 
| 72 start on startup | 70 start on started factory | 
| 73 stop on starting halt or starting reboot | 71 stop on starting halt or starting reboot | 
| 74 | 72 | 
| 75 respawn | 73 respawn | 
| 76 script | 74 script | 
| 77 cd / | 75 tail -F /var/log/factory.log > /dev/tty1 | 
| 
 
Tom Wai-Hong Tam
2010/04/30 02:45:30
"tail -n 48 -F /var/log/factory.log > /dev/tty1" l
 
kmixter1
2010/04/30 19:20:12
So text mode is up on VT1 until X is started?  Who
 
Nick Sanders
2010/05/04 03:41:26
The keyboard test still starts X, as of now. Tammo
 
 | |
| 78 /sbin/agetty 38400 tty1 linux -l /bin/bash -n | |
| 79 end script | 76 end script | 
| 80 EOF | 77 EOF | 
| 81 | 78 | 
| 82 patch -d ${ROOT_FS_DIR} -Np1 <<EOF | 79 patch -d ${ROOT_FS_DIR} -Np1 <<EOF | 
| 83 diff -Naur old/sbin/chromeos_startup new/sbin/chromeos_startup | 80 diff -Naur old/sbin/chromeos_startup new/sbin/chromeos_startup | 
| 84 --- old/sbin/chromeos_startup 2010-04-05 21:33:52.000000000 -0700 | 81 --- 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 | 82 +++ new/sbin/chromeos_startup 2010-04-05 21:38:02.000000000 -0700 | 
| 86 @@ -20,18 +20,12 @@ | 83 @@ -20,18 +20,12 @@ | 
| 87 | 84 | 
| 88 # Moblin trick: Disable blinking cursor. Without this a splash screen | 85 # Moblin trick: Disable blinking cursor. Without this a splash screen | 
| (...skipping 10 matching lines...) Expand all Loading... | |
| 99 -then | 96 -then | 
| 100 - /usr/bin/ply-image /usr/share/chromeos-assets/images/login_splash.png & | 97 - /usr/bin/ply-image /usr/share/chromeos-assets/images/login_splash.png & | 
| 101 -fi | 98 -fi | 
| 102 - | 99 - | 
| 103 mount -n -t tmpfs tmp /tmp | 100 mount -n -t tmpfs tmp /tmp | 
| 104 mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm | 101 mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm | 
| 105 mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts | 102 mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts | 
| 106 EOF | 103 EOF | 
| 107 | 104 | 
| 108 popd | 105 popd | 
| OLD | NEW |