diff options
author | Martin Schwenke <martin@meltin.net> | 2015-02-26 15:34:51 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-03-04 10:42:27 +0100 |
commit | 032441d9a2974584cde455e4dbd5cc33fe6a23c2 (patch) | |
tree | 04e60a06ccd27e6ecfc13c6b2262a23a5fd16144 /ctdb | |
parent | 22602f76bc1ec91e807a8f1cd45ba6fb4c05e622 (diff) | |
download | samba-032441d9a2974584cde455e4dbd5cc33fe6a23c2.tar.gz samba-032441d9a2974584cde455e4dbd5cc33fe6a23c2.tar.xz samba-032441d9a2974584cde455e4dbd5cc33fe6a23c2.zip |
ctdb-scripts: Fix a regression in statd-callout
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>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/config/statd-callout | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout index e2a955eab5..b92942557f 100755 --- a/ctdb/config/statd-callout +++ b/ctdb/config/statd-callout @@ -146,7 +146,7 @@ case "$1" in # 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) |