From 61b150107996931201b11aee36d8a94f0e3d05a3 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Fri, 25 Feb 2011 01:05:33 +0200 Subject: [PATCH] Added support for multiple collabs to clarified::probe --- clarified/manifests/init.pp | 11 ++++++++++- clarified/templates/remote.erb | 7 +++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/clarified/manifests/init.pp b/clarified/manifests/init.pp index 9c13268..0e881d0 100644 --- a/clarified/manifests/init.pp +++ b/clarified/manifests/init.pp @@ -140,12 +140,21 @@ class clarified::recorder inherits clarified { # $remoteport: # Remote port. Defaults to 10000. # $collab: -# Use collab for authentication, format is ":". +# List of collabs for authentication. # $probe: # Enable probe. Defaults to true. # $remote: # Enable remote. Defaults to true. # +# === Sample usage +# +# clarified::probe { "eth0": +# keeptime => "500GB", +# blocksize => "10GB", +# filter => "host 192.168.1.1", +# collab => [ "collabname:PageName", ], +# } +# define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB", $blocksize="1GB", $filter="", $remoteport="10000", $collab="", $probe=true, $remote=true) { diff --git a/clarified/templates/remote.erb b/clarified/templates/remote.erb index 22f5225..4b94df1 100644 --- a/clarified/templates/remote.erb +++ b/clarified/templates/remote.erb @@ -27,8 +27,11 @@ PORT=<%= remoteport %> . /etc/clarified/clarified-functions start() { - - start_remote -p $PORT -c '<%= collab %>' "$WORK_DIR" "$PRIVATE_CERT" "$PUBLIC_CERT" + start_remote \ +<% collab.each do |c| -%> + -c '<%= c %>' \ +<% end -%> + -p $PORT "$WORK_DIR" "$PRIVATE_CERT" "$PUBLIC_CERT" #LOG_SUCCESS "Remote" $REMOTE_IDENT "up" }