mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
Fix dns_huaweicloud subshell return
Replace pipe read with line count loop, fix useless return in subshell.
This commit is contained in:
parent
faedea2120
commit
9088c8741a
@ -136,13 +136,16 @@ _get_zoneid() {
|
|||||||
_debug2 "Return Zone ID(s):" "${zoneidlist}"
|
_debug2 "Return Zone ID(s):" "${zoneidlist}"
|
||||||
_debug2 "Return Zone Name(s):" "${zonenamelist}"
|
_debug2 "Return Zone Name(s):" "${zonenamelist}"
|
||||||
zoneidnum=0
|
zoneidnum=0
|
||||||
echo "${zonenamelist}" | while read -r zonename; do
|
zoneidcount=$(echo "${zoneidlist}" | grep -c '^')
|
||||||
|
_debug "Retund Zone ID(s) Count:" "${zoneidcount}"
|
||||||
|
while [ "${zoneidnum}" -lt "${zoneidcount}" ]; do
|
||||||
zoneidnum=$(_math "$zoneidnum" + 1)
|
zoneidnum=$(_math "$zoneidnum" + 1)
|
||||||
|
_zoneid=$(echo "${zoneidlist}" | sed -n "${zoneidnum}p")
|
||||||
|
zonename=$(echo "${zonenamelist}" | sed -n "${zoneidnum}p")
|
||||||
_debug "Check Zone Name" "${zonename}"
|
_debug "Check Zone Name" "${zonename}"
|
||||||
if [ "${zonename}" = "${h}." ]; then
|
if [ "${zonename}" = "${h}." ]; then
|
||||||
_debug "Get Zone ID Success."
|
_debug "Get Zone ID Success."
|
||||||
_zoneid=$(echo "${zoneidlist}" | sed -n "${zoneidnum}p")
|
_debug "ZoneID:" "${_zoneid}"
|
||||||
_debug2 "ZoneID:" "${_zoneid}"
|
|
||||||
printf "%s" "${_zoneid}"
|
printf "%s" "${_zoneid}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user