fix bug for solaris.

dnsapi/deploy: remove POSIX character classes from sed/grep patterns

Solaris /usr/bin/sed and /usr/bin/grep parse [[:space:]] etc. as a
literal bracket set and silently mis-match. Replace with [ ]* for
JSON matching, a printf-tab bracket for user-input trimming, and
[0-9] for digits; also drop GNU-only sed -r/-E in rage4, selfhost
and selectel, and reuse _strip_blank_lines in byteplus_alb.
This commit is contained in:
neil
2026-07-17 12:38:14 +08:00 Unverified
parent a836e747d1
commit 59a97d7f8b
14 changed files with 71 additions and 30 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ _poweradmin_rest() {
return 1
fi
if printf '%s' "$response" | grep -q '"success"[[:space:]]*:[[:space:]]*false'; then
if printf '%s' "$response" | grep -q '"success"[ ]*:[ ]*false'; then
_err "API reported failure on $method $ep"
_debug "Response: $response"
return 1