diff --git a/ci/hoover.sh b/ci/hoover.sh index c49eaefd0..779e79a29 100755 --- a/ci/hoover.sh +++ b/ci/hoover.sh @@ -40,10 +40,10 @@ echo --- Remove unused docker networks docker network prune -f ) -echo "--- Delete /tmp files older than 1 day owned by $(whoami)" +echo "--- Delete /tmp files older than 1 day owned by $(id -un)" ( set -x - find /tmp -maxdepth 1 -user "$(whoami)" -mtime +1 -print0 | xargs -0 rm -rf + find /tmp -maxdepth 1 -user "$(id -un)" -mtime +1 -print0 | xargs -0 rm -rf ) echo --- Deleting stale buildkite agent build directories diff --git a/net/gce.sh b/net/gce.sh index 862f2a94b..4532aab20 100755 --- a/net/gce.sh +++ b/net/gce.sh @@ -6,7 +6,7 @@ source "$here"/../scripts/gcloud.sh # shellcheck source=net/common.sh source "$here"/common.sh -prefix=testnet-dev-$(whoami | sed -e s/[^a-z0-9].*//) +prefix=testnet-dev-$(id -un | sed -e s/[^a-z0-9].*//) validatorNodeCount=5 clientNodeCount=1 leaderMachineType=n1-standard-16 diff --git a/scripts/gcloud.sh b/scripts/gcloud.sh index db3aa58c4..e9156c9b8 100644 --- a/scripts/gcloud.sh +++ b/scripts/gcloud.sh @@ -205,7 +205,7 @@ gcloud_FigureRemoteUsername() { # instance is reported as RUNNING and when it's reachable over the network timeout 30s bash -c "set -o pipefail; until ping -c 3 $publicIp | tr - _; do echo .; done" - gcloud compute ssh "$name" --zone "$zone" -- "echo whoami \$(whoami)" | tee whoami + gcloud compute ssh "$name" --zone "$zone" -- "echo whoami \$(id -un)" | tee whoami ) [[ "$(tr -dc '[:print:]' < whoami; rm -f whoami)" =~ ^whoami\ (.*)$ ]] || {