From 0ed1db8131e65c432e9d5f5ee3523988a4672c74 Mon Sep 17 00:00:00 2001 From: jinal--shah Date: Wed, 10 May 2017 14:59:28 +0000 Subject: [PATCH] upped timeout for profile; returning correct success code when switching profile --- assets/fs/etc/skel/profile.d/aws | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/fs/etc/skel/profile.d/aws b/assets/fs/etc/skel/profile.d/aws index f391b07..f792c76 100644 --- a/assets/fs/etc/skel/profile.d/aws +++ b/assets/fs/etc/skel/profile.d/aws @@ -31,7 +31,7 @@ aws_mfa_session() { CREDS=$( aws --profile $MFA_PROFILE sts get-session-token \ - --duration-seconds 3600 \ + --duration-seconds 86400 \ --serial-number $MFA_SERIAL \ --token-code $token_code ) @@ -89,7 +89,9 @@ aws_profile() { echo "Using profile $p" unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN export AWS_DEFAULT_PROFILE=$p - [[ ! -z "$x" ]] && _aws_profile_export "$p" + [[ ! -z "$x" ]] && ! _aws_profile_export "$p" && return 1 + + return 0 } _aws_profile_export() {