summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2009-04-07 18:43:06 -0400
committerMicah Anderson <micah@riseup.net>2009-04-07 18:43:06 -0400
commit1337a268ffbd195ca40d59ebd24bb199b99ffc66 (patch)
treed37455c68f6841cd1e94186872c0036855bb74a3
parente972b9abde01a6d89579e20fe4b038c7cbfe0c45 (diff)
add http://shorewall.net/shorewall_extension_scripts.htm extension_script define
-rw-r--r--manifests/init.pp17
1 files changed, 16 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 7c3089b..b022cd6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -7,6 +7,7 @@
# at https://reductivelabs.com/trac/puppet/wiki/AqueosShorewall
#
# Changes:
+# * added extension_script define: http://shorewall.net/shorewall_extension_scripts.htm
# * FHS Layout: put configuration in /var/lib/puppet/modules/shorewall and
# adjust CONFIG_PATH
# * remove shorewall- prefix from defines in the shorewall namespace
@@ -17,7 +18,7 @@
# * add managing for masq, proxyarp, blacklist, nat, rfc1918
# adapted by immerda project group - admin+puppet(at)immerda.ch
# adapted by Puzzle ITC - haerry+puppet(at)puzzle.ch
-#
+# adapted by Riseup Networks - micah(shift+2)riseup.net
modules_dir { "shorewall": }
@@ -201,6 +202,20 @@ class shorewall {
}
}
+ # See http://shorewall.net/shorewall_extension_scripts.htm
+ define extension_script($script = '') {
+ case $name {
+ 'init', 'initdone', 'start', 'started', 'stop', 'stopped', 'clear', 'refresh', 'continue', 'maclog': {
+ managed_file { "${name}": }
+ entry { "${name}.d/500-${hostname}":
+ line => "${script}\n";
+ }
+ }
+ '', default: {
+ err("${name}: unknown shorewall extension script")
+ }
+ }
+ }
}
class shorewall::base {