From 422e5026d60847c1df316539d3e7b91ef2fee2a6 Mon Sep 17 00:00:00 2001 From: neilpang Date: Sat, 12 Nov 2016 11:13:40 +0800 Subject: [PATCH] fix shellcheck warnings --- dnsapi/dns_cx.sh | 2 ++ dnsapi/dns_dp.sh | 2 ++ dnsapi/dns_gd.sh | 2 ++ dnsapi/dns_lexicon.sh | 1 + dnsapi/dns_me.sh | 2 ++ dnsapi/dns_ovh.sh | 2 ++ dnsapi/dns_pdns.sh | 3 +++ 7 files changed, 14 insertions(+) diff --git a/dnsapi/dns_cx.sh b/dnsapi/dns_cx.sh index 38649f3e..0caf0c02 100755 --- a/dnsapi/dns_cx.sh +++ b/dnsapi/dns_cx.sh @@ -17,6 +17,8 @@ dns_cx_add() { txtvalue=$2 if [ -z "$CX_Key" ] || [ -z "$CX_Secret" ]; then + CX_Key="" + CX_Secret="" _err "You don't specify cloudxns.com api key or secret yet." _err "Please create you key and try again." return 1 diff --git a/dnsapi/dns_dp.sh b/dnsapi/dns_dp.sh index a06f157b..aa06d5fc 100755 --- a/dnsapi/dns_dp.sh +++ b/dnsapi/dns_dp.sh @@ -17,6 +17,8 @@ dns_dp_add() { txtvalue=$2 if [ -z "$DP_Id" ] || [ -z "$DP_Key" ]; then + DP_Id="" + DP_Key="" _err "You don't specify dnspod api key and key id yet." _err "Please create you key and try again." return 1 diff --git a/dnsapi/dns_gd.sh b/dnsapi/dns_gd.sh index f96af937..9470ed22 100755 --- a/dnsapi/dns_gd.sh +++ b/dnsapi/dns_gd.sh @@ -16,6 +16,8 @@ dns_gd_add() { txtvalue=$2 if [ -z "$GD_Key" ] || [ -z "$GD_Secret" ]; then + GD_Key="" + GD_Secret="" _err "You don't specify godaddy api key and secret yet." _err "Please create you key and try again." return 1 diff --git a/dnsapi/dns_lexicon.sh b/dnsapi/dns_lexicon.sh index 38b6a13c..a0f707a6 100755 --- a/dnsapi/dns_lexicon.sh +++ b/dnsapi/dns_lexicon.sh @@ -22,6 +22,7 @@ dns_lexicon_add() { fi if [ -z "$PROVIDER" ]; then + PROVIDER="" _err "Please define env PROVIDER first: $wiki" return 1 fi diff --git a/dnsapi/dns_me.sh b/dnsapi/dns_me.sh index f231f7ed..edd88d98 100755 --- a/dnsapi/dns_me.sh +++ b/dnsapi/dns_me.sh @@ -15,6 +15,8 @@ dns_me_add() { txtvalue=$2 if [ -z "$ME_Key" ] || [ -z "$ME_Secret" ]; then + ME_Key="" + ME_Secret="" _err "You didn't specify DNSMadeEasy api key and secret yet." _err "Please create you key and try again." return 1 diff --git a/dnsapi/dns_ovh.sh b/dnsapi/dns_ovh.sh index ed8c42be..377b3de1 100755 --- a/dnsapi/dns_ovh.sh +++ b/dnsapi/dns_ovh.sh @@ -86,6 +86,8 @@ dns_ovh_add() { txtvalue=$2 if [ -z "$OVH_AK" ] || [ -z "$OVH_AS" ]; then + OVH_AK="" + OVH_AS="" _err "You don't specify OVH application key and application secret yet." _err "Please create you key and try again." return 1 diff --git a/dnsapi/dns_pdns.sh b/dnsapi/dns_pdns.sh index 0f6c59d5..5d6d99fd 100755 --- a/dnsapi/dns_pdns.sh +++ b/dnsapi/dns_pdns.sh @@ -17,18 +17,21 @@ dns_pdns_add() { txtvalue=$2 if [ -z "$PDNS_Url" ]; then + PDNS_Url="" _err "You don't specify PowerDNS address." _err "Please set PDNS_Url and try again." return 1 fi if [ -z "$PDNS_ServerId" ]; then + PDNS_ServerId="" _err "You don't specify PowerDNS server id." _err "Please set you PDNS_ServerId and try again." return 1 fi if [ -z "$PDNS_Token" ]; then + PDNS_Token="" _err "You don't specify PowerDNS token." _err "Please create you PDNS_Token and try again." return 1