| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 HAS_INITRAMFS=0 | 7 HAS_INITRAMFS=0 |
| 8 if [ -d /dev/.initramfs ] | 8 if [ -d /dev/.initramfs ] |
| 9 then | 9 then |
| 10 # The initrd will have mounted /sys, /proc, and /dev for us. | 10 # The initrd will have mounted /sys, /proc, and /dev for us. |
| 11 HAS_INITRAMFS=1 | 11 HAS_INITRAMFS=1 |
| 12 else | 12 else |
| 13 mount -n -t sysfs -onodev,noexec,nosuid sysfs /sys | 13 mount -n -t sysfs -onodev,noexec,nosuid sysfs /sys |
| 14 mount -n -t proc -onodev,noexec,nosuid proc /proc | 14 mount -n -t proc -onodev,noexec,nosuid proc /proc |
| 15 mount -n -t tmpfs -omode=0755 udev /dev | 15 mount -n -t tmpfs -omode=0755 udev /dev |
| 16 fi | 16 fi |
| 17 | 17 |
| 18 PRE_UPTIME_STAT=$(cat /proc/uptime) | 18 PRE_UPTIME_STAT=$(cat /proc/uptime) |
| 19 PRE_DISK_STAT=$(cat /sys/block/sda/stat) | 19 PRE_DISK_STAT=$(cat /sys/block/sda/stat) |
| 20 | 20 |
| 21 # Moblin trick: Disable blinking cursor. Without this a splash screen | 21 # Moblin trick: Disable blinking cursor. Without this a splash screen |
| 22 # will show a distinct cursor shape even when the cursor is set to none. | 22 # will show a distinct cursor shape even when the cursor is set to none. |
| 23 echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink | 23 echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink |
| 24 | 24 |
| 25 # Since we defer udev until later in the boot process, we pre-populate /dev | 25 # Since we defer udev until later in the boot process, we pre-populate /dev |
| 26 # with the set of devices needed for X to run. | 26 # with the set of devices needed for X and other early services to run. |
| 27 cp -a -f /lib/udev/devices/* /dev | 27 cp -a -f /lib/chromiumos/devices/* /dev |
| 28 | 28 |
| 29 # Splash screen! | 29 # Splash screen! |
| 30 if [ -x /usr/bin/ply-image ] | 30 if [ -x /usr/bin/ply-image ] |
| 31 then | 31 then |
| 32 /usr/bin/ply-image /usr/share/chromeos-assets/images/login_splash.png & | 32 /usr/bin/ply-image /usr/share/chromeos-assets/images/login_splash.png & |
| 33 fi | 33 fi |
| 34 | 34 |
| 35 mount -n -t tmpfs tmp /tmp | 35 mount -n -t tmpfs tmp /tmp |
| 36 mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm | 36 mount -n -t tmpfs -onosuid,nodev shmfs /dev/shm |
| 37 mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts | 37 mount -n -t devpts -onoexec,nosuid,gid=5,mode=0620 devpts /dev/pts |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 (test -f "$SALT" || head -c 16 /dev/urandom > "$SALT") & | 86 (test -f "$SALT" || head -c 16 /dev/urandom > "$SALT") & |
| 87 | 87 |
| 88 # Write out uptime and disk stats pre/post startup | 88 # Write out uptime and disk stats pre/post startup |
| 89 cat /proc/uptime > /tmp/uptime-post-startup | 89 cat /proc/uptime > /tmp/uptime-post-startup |
| 90 ! cat /sys/block/sda/stat > /tmp/disk-post-startup | 90 ! cat /sys/block/sda/stat > /tmp/disk-post-startup |
| 91 echo "$PRE_UPTIME_STAT" > /tmp/uptime-pre-startup | 91 echo "$PRE_UPTIME_STAT" > /tmp/uptime-pre-startup |
| 92 echo "$PRE_DISK_STAT" > /tmp/disk-pre-startup | 92 echo "$PRE_DISK_STAT" > /tmp/disk-pre-startup |
| 93 | 93 |
| 94 # Always return success to avoid killing init | 94 # Always return success to avoid killing init |
| 95 exit 0 | 95 exit 0 |
| OLD | NEW |