enter_chroot.sh: use GCE boto.cfg
BUG=chromium:589892
TEST=cros_sdk
Change-Id: Icfb14a9fe8a715ff33d7d875285f4ea3b94b95db
Reviewed-on: https://chromium-review.googlesource.com/329423
Commit-Ready: David Riley <davidriley@chromium.org>
Tested-by: David Riley <davidriley@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh
index 0ce58a7..0ddb7ce 100755
--- a/sdk_lib/enter_chroot.sh
+++ b/sdk_lib/enter_chroot.sh
@@ -514,6 +514,11 @@
# Pass --remote-destination to overwrite a symlink.
user_cp "--remove-destination" "${SUDO_HOME}/.boto" "$chroot_user_boto"
cp "--remove-destination" "$chroot_user_boto" "$chroot_root_boto"
+ elif [ -f "/etc/boto.cfg" ]; then
+ # For GCE instances, the non-chroot .boto file is not deployed so
+ # use the system /etc/boto.cfg if it exists.
+ user_cp "--remove-destination" "/etc/boto.cfg" "$chroot_user_boto"
+ cp "--remove-destination" "$chroot_user_boto" "$chroot_root_boto"
fi
# If user doesn't have a boto file, check if the private overlays