Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
9088c874
Unverified
Commit
9088c874
authored
Jan 20, 2022
by
Yuan Ming
Committed by
GitHub
Jan 20, 2022
Browse files
Fix dns_huaweicloud subshell return
Replace pipe read with line count loop, fix useless return in subshell.
parent
faedea21
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_huaweicloud.sh
View file @
9088c874
...
...
@@ -136,13 +136,16 @@ _get_zoneid() {
_debug2
"Return Zone ID(s):"
"
${
zoneidlist
}
"
_debug2
"Return Zone Name(s):"
"
${
zonenamelist
}
"
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
)
_zoneid
=
$(
echo
"
${
zoneidlist
}
"
|
sed
-n
"
${
zoneidnum
}
p"
)
zonename
=
$(
echo
"
${
zonenamelist
}
"
|
sed
-n
"
${
zoneidnum
}
p"
)
_debug
"Check Zone Name"
"
${
zonename
}
"
if
[
"
${
zonename
}
"
=
"
${
h
}
."
]
;
then
_debug
"Get Zone ID Success."
_zoneid
=
$(
echo
"
${
zoneidlist
}
"
|
sed
-n
"
${
zoneidnum
}
p"
)
_debug2
"ZoneID:"
"
${
_zoneid
}
"
_debug
"ZoneID:"
"
${
_zoneid
}
"
printf
"%s"
"
${
_zoneid
}
"
return
0
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment