diff options
author | Donna Dionne <donnadionne@google.com> | 2015-02-13 13:03:49 -0800 |
---|---|---|
committer | Donna Dionne <donnadionne@google.com> | 2015-02-13 13:03:49 -0800 |
commit | 6fd5a35ecccac262412eae1f45762082f4c92079 (patch) | |
tree | 3ae4eddcd722f9507a40c868e8f2c5c1d0523d12 /tools | |
parent | f47491954dbdcb7c4f004d6f1dc41ff9dadc26fd (diff) |
Setting default ssh directory in the case of test runs running as root.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gce_setup/grpc_docker.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 2e02653864..1c38582cb8 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -24,6 +24,10 @@ # Allows gcloud ssh commands to run on freshly started docker instances. _grpc_ensure_gcloud_ssh() { local default_key_file="$HOME/.ssh/google_compute_engine" + if [ "$HOME" == "/" ] + then + default_key_file="/root/.ssh/google_compute_engine" + fi [ -f $default_key_file ] || { ssh-keygen -f $default_key_file -N '' > /dev/null || { echo "could not precreate $default_key_file" 1>&2 |