Skip to content

优化ID判断逻辑,以支持大于32位有限符号整数的情况(BusyBox 32bit)#151

Open
Gnail89 wants to merge 2 commits intorehiy:v6.1.xfrom
Gnail89:v6.1.x_20250813
Open

优化ID判断逻辑,以支持大于32位有限符号整数的情况(BusyBox 32bit)#151
Gnail89 wants to merge 2 commits intorehiy:v6.1.xfrom
Gnail89:v6.1.x_20250813

Conversation

@Gnail89
Copy link

@Gnail89 Gnail89 commented Aug 13, 2025

in v6.1.x

@@ -138,7 +138,7 @@ arDdnsIds() {
domainId=$(arDdnsApi "Domain.Info" "domain=$2")
domainId=$(echo $domainId | sed 's/."id":"([0-9])".*/\1/')

- if ! [ "$domainId" -gt 0 ] 2>/dev/null ;then
+ if [ "$(echo "$domainId 0" |awk '{print ($1 > $2)}')" -eq 0 ] 2>/dev/null ;then
errMsg=$(echo $domainId | sed 's/."message":"([^\"])"./\1/')
echo "arDdnsIds - $errMsg"
return 1
@@ -148,7 +148,7 @@ arDdnsIds() {
recordId=$(arDdnsApi "Record.List" "domain_id=$domainId&sub_domain=$3&record_type=$1")
recordId=$(echo $recordId | sed 's/.
"id":"([0-9])"./\1/')

- if ! [ "$recordId" -gt 0 ] 2>/dev/null ;then
+ if [ "$(echo "$recordId 0" |awk '{print ($1 > $2)}')" -eq 0 ] 2>/dev/null ;then
errMsg=$(echo $recordId | sed 's/."message":"([^\"])".*/\1/')
echo "arDdnsIds - $errMsg"
return 1

@Gnail89 Gnail89 changed the base branch from master to v6.1.x August 13, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments