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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 sudo rm -rf "${ROOT_FS_DIR}/var/lib/xkb" | 231 sudo rm -rf "${ROOT_FS_DIR}/var/lib/xkb" |
232 sudo ln -s /var/cache "${ROOT_FS_DIR}/var/lib/xkb" | 232 sudo ln -s /var/cache "${ROOT_FS_DIR}/var/lib/xkb" |
233 | 233 |
234 # This is needed so that devicekit-disks has a place to | 234 # This is needed so that devicekit-disks has a place to |
235 # put its sql lite database. Since we do not need to | 235 # put its sql lite database. Since we do not need to |
236 # retain this information across boots, we are just | 236 # retain this information across boots, we are just |
237 # putting it in /var/tmp | 237 # putting it in /var/tmp |
238 sudo rm -rf "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" | 238 sudo rm -rf "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" |
239 sudo ln -s /var/tmp "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" | 239 sudo ln -s /var/tmp "${ROOT_FS_DIR}/var/lib/DeviceKit-disks" |
240 | 240 |
| 241 # dbus-uuidgen writes machine-id to /var/lib/dbus. |
| 242 sudo rm -f "${ROOT_FS_DIR}/var/lib/dbus/machine-id" |
| 243 sudo ln -s /var/cache/machine-id "${ROOT_FS_DIR}/var/lib/dbus/machine-id" |
| 244 |
241 # 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 |
242 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-* |
243 | 247 |
244 # Clear the network settings. This must be done last, since it prevents | 248 # Clear the network settings. This must be done last, since it prevents |
245 # any subsequent steps from accessing the network. | 249 # any subsequent steps from accessing the network. |
246 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" | 250 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/network/interfaces" |
247 auto lo | 251 auto lo |
248 iface lo inet loopback | 252 iface lo inet loopback |
249 EOF | 253 EOF |
250 | 254 |
251 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" | 255 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/resolv.conf" |
252 # Use the connman dns proxy. | 256 # Use the connman dns proxy. |
253 nameserver 127.0.0.1 | 257 nameserver 127.0.0.1 |
254 EOF | 258 EOF |
255 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" | 259 sudo chmod a-wx "${ROOT_FS_DIR}/etc/resolv.conf" |
OLD | NEW |