OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
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 # Script to customize the root file system after packages have been installed. | 7 # Script to customize the root file system after packages have been installed. |
8 # | 8 # |
9 # NOTE: This script should be called by build_image.sh. Do not run this | 9 # NOTE: This script should be called by build_image.sh. Do not run this |
10 # on your own unless you know what you are doing. | 10 # on your own unless you know what you are doing. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 TMP_STATIC=$(mktemp -d) | 141 TMP_STATIC=$(mktemp -d) |
142 sudo cp -r "${SRC_ROOT}/rootfs_static_data/common/." "$TMP_STATIC" | 142 sudo cp -r "${SRC_ROOT}/rootfs_static_data/common/." "$TMP_STATIC" |
143 # TODO: Copy additional target-platform-specific subdirectories. | 143 # TODO: Copy additional target-platform-specific subdirectories. |
144 sudo chmod -R a+rX "$TMP_STATIC/." | 144 sudo chmod -R a+rX "$TMP_STATIC/." |
145 sudo cp -r "$TMP_STATIC/." "$ROOT_FS_DIR" | 145 sudo cp -r "$TMP_STATIC/." "$ROOT_FS_DIR" |
146 sudo rm -rf "$TMP_STATIC" | 146 sudo rm -rf "$TMP_STATIC" |
147 | 147 |
148 # Fix issue where alsa-base (dependency of alsa-utils) is messing up our sound | 148 # Fix issue where alsa-base (dependency of alsa-utils) is messing up our sound |
149 # drivers. The stock modprobe settings worked fine. | 149 # drivers. The stock modprobe settings worked fine. |
150 # TODO: Revisit when we have decided on how sound will work on chromeos. | 150 # TODO: Revisit when we have decided on how sound will work on chromeos. |
151 sudo rm "${ROOT_FS_DIR}/etc/modprobe.d/alsa-base.conf" | 151 ! sudo rm "${ROOT_FS_DIR}/etc/modprobe.d/alsa-base.conf" |
152 | 152 |
153 # Remove unneeded fonts. | 153 # Remove unneeded fonts. |
154 sudo rm -rf "${ROOT_FS_DIR}/usr/share/fonts/X11" | 154 sudo rm -rf "${ROOT_FS_DIR}/usr/share/fonts/X11" |
155 | 155 |
156 # The udev daemon takes a long time to start up and settle so we defer it until | 156 # The udev daemon takes a long time to start up and settle so we defer it until |
157 # after X11 has been started. In order to be able to mount the root file system | 157 # after X11 has been started. In order to be able to mount the root file system |
158 # and start X we pre-populate some devices. These are copied into /dev by the | 158 # and start X we pre-populate some devices. These are copied into /dev by the |
159 # chromeos_startup script. | 159 # chromeos_startup script. |
160 # TODO: There is no good reason to put this in /lib/udev/devices. Move it. | 160 # TODO: There is no good reason to put this in /lib/udev/devices. Move it. |
161 # TODO: Hopefully some of this can be taken care of by devtmpfs. | 161 # TODO: Hopefully some of this can be taken care of by devtmpfs. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" | 246 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" |
247 auto lo | 247 auto lo |
248 iface lo inet loopback | 248 iface lo inet loopback |
249 EOF | 249 EOF |
250 | 250 |
251 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" | 251 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" |
252 # Use the connman dns proxy. | 252 # Use the connman dns proxy. |
253 nameserver 127.0.0.1 | 253 nameserver 127.0.0.1 |
254 EOF | 254 EOF |
255 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" | 255 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" |
OLD | NEW |