| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 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 # Customizes the root file system of a chromium-based os. | 7 # Customizes the root file system of a chromium-based os. |
| 8 # NOTE: This script should be called by build_image.sh. Do not run this | 8 # NOTE: This script should be called by build_image.sh. Do not run this |
| 9 # on your own unless you know what you are doing. | 9 # on your own unless you know what you are doing. |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 # Use a random password. unix_md5_crypt will generate a random salt. | 35 # Use a random password. unix_md5_crypt will generate a random salt. |
| 36 echo "Using random password." | 36 echo "Using random password." |
| 37 PASSWORD="$(base64 /dev/urandom | head -1)" | 37 PASSWORD="$(base64 /dev/urandom | head -1)" |
| 38 CRYPTED_PASSWD="$(echo "$PASSWORD" | openssl passwd -1 -stdin)" | 38 CRYPTED_PASSWD="$(echo "$PASSWORD" | openssl passwd -1 -stdin)" |
| 39 PASSWORD="gone now" | 39 PASSWORD="gone now" |
| 40 fi | 40 fi |
| 41 | 41 |
| 42 # Set CHROMEOS_VERSION_DESCRIPTION here (uses vars set in chromeos_version.sh) | 42 # Set CHROMEOS_VERSION_DESCRIPTION here (uses vars set in chromeos_version.sh) |
| 43 # Was removed from chromeos_version.sh which can also be run outside of chroot | 43 # Was removed from chromeos_version.sh which can also be run outside of chroot |
| 44 # where CHROMEOS_REVISION is set | 44 # where CHROMEOS_REVISION is set |
| 45 # We have to set (in build_image.sh) and use REAL_USER due to many nested |
| 46 # chroots which lose $USER state. |
| 45 if [ ${CHROMEOS_OFFICIAL:-0} = 1 ]; then | 47 if [ ${CHROMEOS_OFFICIAL:-0} = 1 ]; then |
| 46 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Official Bui
ld ${CHROMEOS_REVISION:?})" | 48 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Official Buil
d ${CHROMEOS_REVISION:?})" |
| 47 elif [ "$USER" = "chrome-bot" ] | 49 elif [ "$REAL_USER" = "chrome-bot" ] |
| 48 then | 50 then |
| 49 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Continuous B
uild ${CHROMEOS_REVISION:?} - Builder: ${BUILDBOT_BUILD:-"N/A"})" | 51 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Continuous Bu
ild ${CHROMEOS_REVISION:?} - Builder: ${BUILDBOT_BUILD:-"N/A"})" |
| 50 else | 52 else |
| 51 # Use the $USER passthru via $CHROMEOS_RELEASE_CODENAME | 53 # Use the $USER passthru via $CHROMEOS_RELEASE_CODENAME |
| 52 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Developer Bu
ild ${CHROMEOS_REVISION:?} - $(date) - $CHROMEOS_RELEASE_CODENAME)" | 54 export CHROMEOS_VERSION_DESCRIPTION="${CHROMEOS_VERSION_STRING} (Developer Bui
ld ${CHROMEOS_REVISION:?} - $(date) - $CHROMEOS_RELEASE_CODENAME)" |
| 53 fi | 55 fi |
| 54 | 56 |
| 55 # Set google-specific version numbers: | 57 # Set google-specific version numbers: |
| 56 # CHROMEOS_RELEASE_CODENAME is the codename of the release. | 58 # CHROMEOS_RELEASE_CODENAME is the codename of the release. |
| 57 # CHROMEOS_RELEASE_DESCRIPTION is the version displayed by Chrome; see | 59 # CHROMEOS_RELEASE_DESCRIPTION is the version displayed by Chrome; see |
| 58 # chrome/browser/chromeos/chromeos_version_loader.cc. | 60 # chrome/browser/chromeos/chromeos_version_loader.cc. |
| 59 # CHROMEOS_RELEASE_NAME is a human readable name for the build. | 61 # CHROMEOS_RELEASE_NAME is a human readable name for the build. |
| 60 # CHROMEOS_RELEASE_TRACK and CHROMEOS_RELEASE_VERSION are used by the software | 62 # CHROMEOS_RELEASE_TRACK and CHROMEOS_RELEASE_VERSION are used by the software |
| 61 # update service. | 63 # update service. |
| 62 # TODO(skrul): Remove GOOGLE_RELEASE once Chromium is updated to look at | 64 # TODO(skrul): Remove GOOGLE_RELEASE once Chromium is updated to look at |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 cat <<EOF > /etc/network/interfaces | 196 cat <<EOF > /etc/network/interfaces |
| 195 auto lo | 197 auto lo |
| 196 iface lo inet loopback | 198 iface lo inet loopback |
| 197 EOF | 199 EOF |
| 198 | 200 |
| 199 cat <<EOF > /etc/resolv.conf | 201 cat <<EOF > /etc/resolv.conf |
| 200 # Use the connman dns proxy. | 202 # Use the connman dns proxy. |
| 201 nameserver 127.0.0.1 | 203 nameserver 127.0.0.1 |
| 202 EOF | 204 EOF |
| 203 chmod a-wx /etc/resolv.conf | 205 chmod a-wx /etc/resolv.conf |
| OLD | NEW |