From 0ca150a7d9cb994b9063d0d69e333fba81e2cd37 Mon Sep 17 00:00:00 2001 From: Stephen Dendtler Date: Wed, 6 Jan 2021 17:43:39 +0000 Subject: [PATCH] Removed excess whitespace and added validate return code --- dnsapi/dns_rackcorp.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dnsapi/dns_rackcorp.sh b/dnsapi/dns_rackcorp.sh index e5ad54db..f56ea753 100644 --- a/dnsapi/dns_rackcorp.sh +++ b/dnsapi/dns_rackcorp.sh @@ -114,7 +114,6 @@ _get_root() { _rackcorp_validate() { RACKCORP_APIUUID="${RACKCORP_APIUUID:-$(_readaccountconf_mutable RACKCORP_APIUUID)}" - if [ -z "$RACKCORP_APIUUID" ]; then RACKCORP_APIUUID="" _err "You require a RackCorp API UUID (export RACKCORP_APIUUID=\"\")" @@ -124,10 +123,7 @@ _rackcorp_validate() { _saveaccountconf_mutable RACKCORP_APIUUID "$RACKCORP_APIUUID" - - RACKCORP_APISECRET="${RACKCORP_APISECRET:-$(_readaccountconf_mutable RACKCORP_APISECRET)}" - if [ -z "$RACKCORP_APISECRET" ]; then RACKCORP_APISECRET="" _err "You require a RackCorp API secret (export RACKCORP_APISECRET=\"\")" @@ -135,9 +131,9 @@ _rackcorp_validate() { return 1 fi - #save the api key to the account conf file. _saveaccountconf_mutable RACKCORP_APISECRET "$RACKCORP_APISECRET" + return 0 } _rackcorp_api() { _rackcorpcmd=$1