Some customize_rootfs cleanup.

Review URL: http://chromereview.prom.corp.google.com/1186028


git-svn-id: svn://chrome-svn/chromeos/trunk@213 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
tedbo@google.com 2009-11-12 03:39:50 +00:00
parent b35803f10c
commit 45ffc9a3de

View File

@ -163,15 +163,6 @@ EOF
# Setup bootchart. Due to dependencies, this adds about 180MB! # Setup bootchart. Due to dependencies, this adds about 180MB!
apt-get --yes --force-yes install bootchart apt-get --yes --force-yes install bootchart
# Bootchart has been dying from a SIGHUP partway through boot. Daemonize it
# so that it won't get HUP'd
# TODO(tedbo): Remove when fixed upstream.
if [ -f /etc/init.d/bootchart ]
then
sed -i 's^/lib/bootchart/collector \$HZ \$LOGS 2>/dev/null \&^start-stop-daemon --background --start --exec /lib/bootchart/collector -- \$HZ \$LOGS^' \
/etc/init.d/bootchart
fi
# Install additional packages from a second mirror, if necessary. This must # Install additional packages from a second mirror, if necessary. This must
# be done after all packages from the first repository are installed; after # be done after all packages from the first repository are installed; after
# the apt-get update, apt-get and debootstrap will prefer the newest package # the apt-get update, apt-get and debootstrap will prefer the newest package
@ -357,18 +348,10 @@ Section "ServerLayout"
EndSection EndSection
EOF EOF
# The udev daemon takes a long time to start up and settle. We modify the # The udev daemon takes a long time to start up and settle so we defer it until
# udev init script to settle in the backround, but in order to be able to # after X11 has been started. In order to be able to mount the root file system
# mount the root file system and start X we pre-propulate some devices. # and start X we pre-propulate some devices. These are copied into /dev by the
# Our rcS script copies whatever devices are in /lib/udev/devices # chromeos_startup script.
# to the tmpfs /dev well before we start udev, so we need to disable
# the copy step that is in the udev start script.
sed -i '{ s/# This next bit can take a while/&\n\{/ }' \
/etc/init.d/udev # Add '{' after the comment line.
sed -i '{ s/kill $UDEV_MONITOR_PID/&\n\} \&/ }' \
/etc/init.d/udev # Add '} &' after the kill line.
sed -i '{ s^cp -a -f /lib/udev/devices/\* /dev^^ }' \
/etc/init.d/udev # Remove step that prepopulates /dev
UDEV_DEVICES=/lib/udev/devices UDEV_DEVICES=/lib/udev/devices
mkdir "$UDEV_DEVICES"/dri mkdir "$UDEV_DEVICES"/dri
mkdir "$UDEV_DEVICES"/input mkdir "$UDEV_DEVICES"/input
@ -416,7 +399,7 @@ chmod 0666 "$UDEV_DEVICES"/null # Fix misconfiguration of /dev/null
ln -sf /proc/mounts /etc/mtab ln -sf /proc/mounts /etc/mtab
# TODO(tedbo): We don't rely on any upstart provided jobs. When we build # TODO(tedbo): We don't rely on any upstart provided jobs. When we build
# our own upstart, stop if from installing jobs and then remove the lines # our own upstart, stop it from installing jobs and then remove the lines
# below that remove stuff from /etc/init # below that remove stuff from /etc/init
# We don't need last-good-boot if it exits # We don't need last-good-boot if it exits
@ -435,6 +418,9 @@ rm -f /etc/init/rc.conf
rm -f /etc/init/rcS.conf rm -f /etc/init/rcS.conf
rm -f /etc/init/rc-sysinit.conf rm -f /etc/init/rc-sysinit.conf
# We may want to tell init to connect to dbus in the future, but not now.
rm -f /etc/init/dbus-reconnect.conf
# By default, xkb writes computed configuration data to # By default, xkb writes computed configuration data to
# /var/lib/xkb. It can re-use this data to reduce startup # /var/lib/xkb. It can re-use this data to reduce startup
# time. In addition, if it fails to write we've observed # time. In addition, if it fails to write we've observed