From c551bbbb692e03d3035165f7798c85e9cb76c8b9 Mon Sep 17 00:00:00 2001 From: Jake Guffey Date: Wed, 19 Sep 2012 15:49:36 -0400 Subject: [PATCH] Initial commit Initial commit of __pf_apply type before actually creating logic --- conf/type/__pf_apply/gencode-remote | 34 +++++++++++++++++++ conf/type/__pf_apply/man.text | 52 +++++++++++++++++++++++++++++ conf/type/__pf_apply/singleton | 0 3 files changed, 86 insertions(+) create mode 100755 conf/type/__pf_apply/gencode-remote create mode 100644 conf/type/__pf_apply/man.text create mode 100644 conf/type/__pf_apply/singleton diff --git a/conf/type/__pf_apply/gencode-remote b/conf/type/__pf_apply/gencode-remote new file mode 100755 index 00000000..309eb12d --- /dev/null +++ b/conf/type/__pf_apply/gencode-remote @@ -0,0 +1,34 @@ +#!/bin/sh +# +# 2012 Jake Guffey (jake.guffey at eprotex.com) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Apply pf(4) ruleset on *BSD +# + +# Debug +#exec >&2 +#set -x + +cat < + + +NAME +---- +cdist-type__pf_apply - Apply pf(4) ruleset on *BSD + + +DESCRIPTION +----------- +This type is used on *BSD systems to manage the pf firewall's active ruleset. + + +REQUIRED PARAMETERS +------------------- +NONE + + +OPTIONAL PARAMETERS +------------------- +NONE + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Modify the ruleset on $__target_host: +__pf_ruleset --state present --source /my/pf/ruleset.conf +require="__pf_ruleset" \ + __pf_apply + +# Remove the ruleset on $__target_host (implies disabling pf(4): +__pf_ruleset --state absent +require="__pf_ruleset" \ + __pf_apply +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__pf_ruleset(7) +- pf(4) + + +COPYING +------- +Copyright \(C) 2012 Jake Guffey. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__pf_apply/singleton b/conf/type/__pf_apply/singleton new file mode 100644 index 00000000..e69de29b