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 install packages into the target root file system. | 7 # Script to install packages into the target root file system. |
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 sudo cp -a /etc/resolv.conf "${ROOT_FS_DIR}/etc/resolv.conf" | 204 sudo cp -a /etc/resolv.conf "${ROOT_FS_DIR}/etc/resolv.conf" |
205 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/invoke-rc.d" | 205 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/invoke-rc.d" |
206 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/update-rc.d" | 206 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/update-rc.d" |
207 | 207 |
208 # Set up mounts for working within the rootfs. We copy some basic | 208 # Set up mounts for working within the rootfs. We copy some basic |
209 # network information from the host so that maintainer scripts can | 209 # network information from the host so that maintainer scripts can |
210 # access the network as needed. | 210 # access the network as needed. |
211 # TODO: All of this rootfs mount stuff can be removed as soon as we stop | 211 # TODO: All of this rootfs mount stuff can be removed as soon as we stop |
212 # running the maintainer scripts on install. | 212 # running the maintainer scripts on install. |
213 sudo mount -t proc proc "${ROOT_FS_DIR}/proc" | 213 sudo mount -t proc proc "${ROOT_FS_DIR}/proc" |
214 sudo cp /etc/hosts "${ROOT_FS_DIR}/etc" | |
215 trap cleanup_rootfs_mounts EXIT | 214 trap cleanup_rootfs_mounts EXIT |
216 | 215 |
217 # Install prod packages | 216 # Install prod packages |
218 COMPONENTS=`cat $FLAGS_package_list | sed -e 's/#.*//' | grep -v '^ *$' | sed '/
$/{N;s/\n/ /;}'` | 217 COMPONENTS=`cat $FLAGS_package_list | sed -e 's/#.*//' | grep -v '^ *$' | sed '/
$/{N;s/\n/ /;}'` |
219 sudo APT_CONFIG="$APT_CONFIG" DEBIAN_FRONTEND=noninteractive \ | 218 sudo APT_CONFIG="$APT_CONFIG" DEBIAN_FRONTEND=noninteractive \ |
220 apt-get --force-yes install $COMPONENTS | 219 apt-get --force-yes install $COMPONENTS |
221 | 220 |
222 # Create kernel installation configuration to suppress warnings, | 221 # Create kernel installation configuration to suppress warnings, |
223 # install the kernel in /boot, and manage symlinks. | 222 # install the kernel in /boot, and manage symlinks. |
224 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf" | 223 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf" |
(...skipping 12 matching lines...) Expand all Loading... |
237 apt-get --force-yes install "linux-image-${KERNEL_VERSION}" | 236 apt-get --force-yes install "linux-image-${KERNEL_VERSION}" |
238 | 237 |
239 # List all packages installed so far, since these are what the local | 238 # List all packages installed so far, since these are what the local |
240 # repository needs to contain. | 239 # repository needs to contain. |
241 # TODO: Replace with list_installed_packages.sh when it is fixed up. | 240 # TODO: Replace with list_installed_packages.sh when it is fixed up. |
242 dpkg --root="${ROOT_FS_DIR}" -l > \ | 241 dpkg --root="${ROOT_FS_DIR}" -l > \ |
243 "${OUTPUT_DIR}/package_list_installed.txt" | 242 "${OUTPUT_DIR}/package_list_installed.txt" |
244 | 243 |
245 cleanup_rootfs_mounts | 244 cleanup_rootfs_mounts |
246 trap - EXIT | 245 trap - EXIT |
OLD | NEW |