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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 # This is needed so that devicekit-disks has a place to | 238 # This is needed so that devicekit-disks has a place to |
239 # put its sql lite database. Since we do not need to | 239 # put its sql lite database. Since we do not need to |
240 # retain this information across boots, we are just | 240 # retain this information across boots, we are just |
241 # putting it in /var/tmp | 241 # putting it in /var/tmp |
242 sudo rm -rf "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" | 242 sudo rm -rf "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" |
243 sudo ln -s /var/tmp "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" | 243 sudo ln -s /var/tmp "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" |
244 | 244 |
245 # Remove pam-mount's default entry in common-auth and common-session | 245 # Remove pam-mount's default entry in common-auth and common-session |
246 sudo sed -i 's/^\(.*pam_mount.so.*\)/#\1/g' "${ROOT_FS_DIR}"/etc/pam.d/common-* | 246 sudo sed -i 's/^\(.*pam_mount.so.*\)/#\1/g' "${ROOT_FS_DIR}"/etc/pam.d/common-* |
247 | 247 |
| 248 # A nice fake hostname to keep things happy. |
| 249 echo "localhost" | sudo dd of="${ROOT_FS_DIR}/etc/hostname" |
| 250 |
248 # Clear the network settings. This must be done last, since it prevents | 251 # Clear the network settings. This must be done last, since it prevents |
249 # any subsequent steps from accessing the network. | 252 # any subsequent steps from accessing the network. |
250 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" | 253 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" |
251 auto lo | 254 auto lo |
252 iface lo inet loopback | 255 iface lo inet loopback |
253 EOF | 256 EOF |
254 | 257 |
255 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" | 258 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" |
256 # Use the connman dns proxy. | 259 # Use the connman dns proxy. |
257 nameserver 127.0.0.1 | 260 nameserver 127.0.0.1 |
258 EOF | 261 EOF |
259 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" | 262 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" |
OLD | NEW |