[Pkg-samba-maint] [samba] 06/17: ctdb-scripts: Fix regression when cleaning up routing table IDs
Mathieu Parent
sathieu at moszumanska.debian.org
Mon Mar 6 11:50:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
sathieu pushed a commit to branch master
in repository samba.
commit 88ef026ec67c06e2c0a36aaa128c7be54f0cc5f2
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jan 16 07:24:15 2017 +1100
ctdb-scripts: Fix regression when cleaning up routing table IDs
Commit 0ca00267cd2620a14968961738bcd2a69b597e95 removed explicit
continuations in strings for awk programs. In one case this causes a
disconnect between condition and action, where an implicit
continuation does not work. This results in duplicate lines in the
rt_tables file.
Move the opening brace for the action to make the implicit
continuation work as expected.
An alternative would be to revert the removal of the explicit
continuations and add shellcheck tags. However, that doesn't mean
that an author of future code will necessarily use explicit
continuations, so the same mistake might still be make in the future.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12516
Reported-by: Barry Evans <bevans at pixitmedia.com>
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
(cherry picked from commit f9368f8e129cb32ee30cb6501a6fe728db37e1d5)
---
ctdb/config/events.d/13.per_ip_routing | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing
index c6a87c9..41724bb 100755
--- a/ctdb/config/events.d/13.per_ip_routing
+++ b/ctdb/config/events.d/13.per_ip_routing
@@ -184,8 +184,8 @@ clean_up_table_ids ()
-v pre="$table_id_prefix" \
'/^#/ ||
!(min <= $1 && $1 <= max) &&
- !(index($2, pre) == 1)
- { print $0 }' "$rt_tables" >"$_tmp"
+ !(index($2, pre) == 1) {
+ print $0 }' "$rt_tables" >"$_tmp"
mv "$_tmp" "$rt_tables"
) 9>"$rt_tables_lock"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list