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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user