From b9dcd01ea1cb1842641f75e575e9d346b6ca46e1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 4 Dec 2013 13:19:04 +0100 Subject: [PATCH] only restart the firewall (iptables) if needed Signed-off-by: Nico Schottelius --- cdist/conf/type/__iptables_apply/gencode-remote | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__iptables_apply/gencode-remote b/cdist/conf/type/__iptables_apply/gencode-remote index 0773b452..9cdf28cf 100644 --- a/cdist/conf/type/__iptables_apply/gencode-remote +++ b/cdist/conf/type/__iptables_apply/gencode-remote @@ -1,2 +1,3 @@ -# Rebuild rules - FIXME: do conditionally as soon as cdist supports it -echo /etc/init.d/iptables restart +if grep -q "^__file/etc/iptables.d/" "$__messages_in"; then + echo /etc/init.d/iptables restart +fi