summaryrefslogtreecommitdiff
path: root/templates/firewall/group
diff options
context:
space:
mode:
Diffstat (limited to 'templates/firewall/group')
-rw-r--r--templates/firewall/group/address-group/node.def6
-rw-r--r--templates/firewall/group/network-group/node.def6
-rw-r--r--templates/firewall/group/port-group/node.def6
3 files changed, 12 insertions, 6 deletions
diff --git a/templates/firewall/group/address-group/node.def b/templates/firewall/group/address-group/node.def
index 5b2e510..13b2e72 100644
--- a/templates/firewall/group/address-group/node.def
+++ b/templates/firewall/group/address-group/node.def
@@ -15,5 +15,7 @@ syntax:expression: pattern $VAR(@) "^[^!]" ; \
syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
"Firewall group name cannot contain shell punctuation"
-end: sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
- --set-name="$VAR(@)" --set-type=address
+end: if sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
+ --set-name="$VAR(@)" --set-type=address; then
+ ${vyatta_sbindir}/vyatta-firewall-trap.pl --level="firewall group address-group $VAR(@)"
+ fi
diff --git a/templates/firewall/group/network-group/node.def b/templates/firewall/group/network-group/node.def
index 8e50b7d..263a772 100644
--- a/templates/firewall/group/network-group/node.def
+++ b/templates/firewall/group/network-group/node.def
@@ -15,6 +15,8 @@ syntax:expression: pattern $VAR(@) "^[^!]" ; \
syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
"Firewall group name cannot contain shell punctuation"
-end: sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
- --set-name="$VAR(@)" --set-type=network
+end: if sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
+ --set-name="$VAR(@)" --set-type=network; then
+ ${vyatta_sbindir}/vyatta-firewall-trap.pl --level="firewall group network-group $VAR(@)"
+ fi
diff --git a/templates/firewall/group/port-group/node.def b/templates/firewall/group/port-group/node.def
index 949403e..1484be2 100644
--- a/templates/firewall/group/port-group/node.def
+++ b/templates/firewall/group/port-group/node.def
@@ -15,5 +15,7 @@ syntax:expression: pattern $VAR(@) "^[^!]" ; \
syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
"Firewall group name cannot contain shell punctuation"
-end: sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
- --set-name="$VAR(@)" --set-type=port
+end: if sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
+ --set-name="$VAR(@)" --set-type=port; then
+ ${vyatta_sbindir}/vyatta-firewall-trap.pl --level="firewall group port-group $VAR(@)"
+ fi