Commit
4638010abb116aed0c180207aaa11475277aecb7 changed from using
gensub() to gsub() in awk. However, it didn't halve the number of
backslashes in the target strings. This is necessary because
backslash is used in gensub() target strings to allow substitution of
text matching parenthesised subexpressions. This is not the case with
gsub().
So, halve the number of backslashes in the target string where gsub()
is used in statd-callout. This is the only target string broken by
changes made by the above commit
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
032441d9a2974584cde455e4dbd5cc33fe6a23c2)
# but only for the server-IPs that are hosted on this node.
sed_expr=$(ctdb ip | tail -n +2 |
awk -v pnn=$pnn 'pnn == $2 { \
- ip = $1; gsub(/\./, "\\\\.", ip); \
+ ip = $1; gsub(/\./, "\\.", ip); \
printf "s/^key.*=.*statd-state@\\(%s\\)@\\([^\"]*\\).*/\\1 \\2/p\n", ip }')
statd_state=$(ctdb catdb ctdb.tdb | sed -n "$sed_expr" | sort)