Browse Source

fix shellcheck warnings

neilpang 8 years ago
parent
commit
422e5026d6
7 changed files with 14 additions and 0 deletions
  1. 2 0
      dnsapi/dns_cx.sh
  2. 2 0
      dnsapi/dns_dp.sh
  3. 2 0
      dnsapi/dns_gd.sh
  4. 1 0
      dnsapi/dns_lexicon.sh
  5. 2 0
      dnsapi/dns_me.sh
  6. 2 0
      dnsapi/dns_ovh.sh
  7. 3 0
      dnsapi/dns_pdns.sh

+ 2 - 0
dnsapi/dns_cx.sh

@@ -17,6 +17,8 @@ dns_cx_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$CX_Key" ] || [ -z "$CX_Secret" ]; then
   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 "You don't specify cloudxns.com  api key or secret yet."
     _err "Please create you key and try again."
     _err "Please create you key and try again."
     return 1
     return 1

+ 2 - 0
dnsapi/dns_dp.sh

@@ -17,6 +17,8 @@ dns_dp_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$DP_Id" ] || [ -z "$DP_Key" ]; then
   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 "You don't specify dnspod api key and key id yet."
     _err "Please create you key and try again."
     _err "Please create you key and try again."
     return 1
     return 1

+ 2 - 0
dnsapi/dns_gd.sh

@@ -16,6 +16,8 @@ dns_gd_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$GD_Key" ] || [ -z "$GD_Secret" ]; then
   if [ -z "$GD_Key" ] || [ -z "$GD_Secret" ]; then
+    GD_Key=""
+    GD_Secret=""
     _err "You don't specify godaddy api key and secret yet."
     _err "You don't specify godaddy api key and secret yet."
     _err "Please create you key and try again."
     _err "Please create you key and try again."
     return 1
     return 1

+ 1 - 0
dnsapi/dns_lexicon.sh

@@ -22,6 +22,7 @@ dns_lexicon_add() {
   fi
   fi
 
 
   if [ -z "$PROVIDER" ]; then
   if [ -z "$PROVIDER" ]; then
+    PROVIDER=""
     _err "Please define env PROVIDER first: $wiki"
     _err "Please define env PROVIDER first: $wiki"
     return 1
     return 1
   fi
   fi

+ 2 - 0
dnsapi/dns_me.sh

@@ -15,6 +15,8 @@ dns_me_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$ME_Key" ] || [ -z "$ME_Secret" ]; then
   if [ -z "$ME_Key" ] || [ -z "$ME_Secret" ]; then
+    ME_Key=""
+    ME_Secret=""
     _err "You didn't specify DNSMadeEasy api key and secret yet."
     _err "You didn't specify DNSMadeEasy api key and secret yet."
     _err "Please create you key and try again."
     _err "Please create you key and try again."
     return 1
     return 1

+ 2 - 0
dnsapi/dns_ovh.sh

@@ -86,6 +86,8 @@ dns_ovh_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$OVH_AK" ] || [ -z "$OVH_AS" ]; then
   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 "You don't specify OVH application key and application secret yet."
     _err "Please create you key and try again."
     _err "Please create you key and try again."
     return 1
     return 1

+ 3 - 0
dnsapi/dns_pdns.sh

@@ -17,18 +17,21 @@ dns_pdns_add() {
   txtvalue=$2
   txtvalue=$2
 
 
   if [ -z "$PDNS_Url" ]; then
   if [ -z "$PDNS_Url" ]; then
+    PDNS_Url=""
     _err "You don't specify PowerDNS address."
     _err "You don't specify PowerDNS address."
     _err "Please set PDNS_Url and try again."
     _err "Please set PDNS_Url and try again."
     return 1
     return 1
   fi
   fi
 
 
   if [ -z "$PDNS_ServerId" ]; then
   if [ -z "$PDNS_ServerId" ]; then
+    PDNS_ServerId=""
     _err "You don't specify PowerDNS server id."
     _err "You don't specify PowerDNS server id."
     _err "Please set you PDNS_ServerId and try again."
     _err "Please set you PDNS_ServerId and try again."
     return 1
     return 1
   fi
   fi
 
 
   if [ -z "$PDNS_Token" ]; then
   if [ -z "$PDNS_Token" ]; then
+    PDNS_Token=""
     _err "You don't specify PowerDNS token."
     _err "You don't specify PowerDNS token."
     _err "Please create you PDNS_Token and try again."
     _err "Please create you PDNS_Token and try again."
     return 1
     return 1