firewalld: Add -w option to invocation of `iptables` command

When multiple processes use `iptables` to modify the firewall, the
command grabs an exclusive lock for the table being modified. If the
lock cannot be obtained (another instance of iptables is running),
the current instance fails with an error.

By adding -w we make it wait for the other lock to be released before
proceeding.

BUG=brillo:1240
TEST=`FEATURES=test emerge-gizmo firewalld`
     test_that -b gizmo <ip> security_Firewall

Change-Id: If147f6869d2df0e8f355323a265718f1cb8d617f
Reviewed-on: https://chromium-review.googlesource.com/285512
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
1 file changed