The Samba-Bugzilla – Attachment 12829 Details for
Bug 12516
/etc/iproute2/rt_tables gets populated with multiple 'default' entries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master and probably 4.5
0001-ctdb-scripts-Fix-regression-when-cleaning-up-routing.patch (text/plain), 1.59 KB, created by
Martin Schwenke
on 2017-01-15 20:34:27 UTC
(
hide
)
Description:
Patch for master and probably 4.5
Filename:
MIME Type:
Creator:
Martin Schwenke
Created:
2017-01-15 20:34:27 UTC
Size:
1.59 KB
patch
obsolete
>From f456ecfafffa50b81c2162c82200071257513963 Mon Sep 17 00:00:00 2001 >From: Martin Schwenke <martin@meltin.net> >Date: Mon, 16 Jan 2017 07:24:15 +1100 >Subject: [PATCH] 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. > >Reported-by: Barry Evans <bevans@pixitmedia.com> >Signed-off-by: Martin Schwenke <martin@meltin.net> >--- > 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 c4b25354561..cb5cf97dd7d 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" >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12516
:
12829
|
12836
|
12837