From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 2/6] vpn-security-policies: add new function vpn_security_policies_list_all Date: Thu, 03 Aug 2017 12:51:23 +0200 Message-ID: <1501757487-5782-2-git-send-email-jonatan.schlag@ipfire.org> In-Reply-To: <1501757487-5782-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3665651466992704980==" List-Id: --===============3665651466992704980== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Jonatan Schlag --- src/functions/functions.vpn-security-policies | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/functions/functions.vpn-security-policies b/src/functions/fu= nctions.vpn-security-policies index 8bb9065..d17a155 100644 --- a/src/functions/functions.vpn-security-policies +++ b/src/functions/functions.vpn-security-policies @@ -1002,3 +1002,17 @@ vpn_security_policies_make_esp_proposal() { # Returns as a comma-separated list list_join proposals , } + +# List all security policies +vpn_security_policies_list_all() { + local security_policy + for security_policy in ${NETWORK_SHARE_DIR}/vpn/security-policies/*; do + [ -f ${security_policy} ] || continue + basename ${security_policy} + done + + for security_policy in ${NETWORK_CONFIG_DIR}/vpn/security-policies/*; do + [ -f ${security_policy} ] || continue + basename ${security_policy} + done +} --=20 2.6.3 --===============3665651466992704980==--