From ef5197d78177ad6c1621e55799a39e99e0751b6a Mon Sep 17 00:00:00 2001 From: James Edwards Date: Wed, 9 Jul 2014 12:41:08 +0100 Subject: Allow option to avoid loading imfile module twice. This throws a warning with version 8 of rsyslog. The best way to use imfile is to define the module list in extra_modules. However, if you still try to create an imfile without adding that it will still work the old way (adding modload imfile to the begining of the imfile). --- templates/imfile.erb | 3 +++ templates/modload.erb | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 templates/modload.erb (limited to 'templates') diff --git a/templates/imfile.erb b/templates/imfile.erb index 8b24edb..4a11c72 100644 --- a/templates/imfile.erb +++ b/templates/imfile.erb @@ -1,4 +1,7 @@ +<% if @extra_modules.empty?() or !@extra_modules.include?('imfile') -%> $ModLoad imfile +<% end -%> + $InputFileName <%= @file_name %> $InputFileTag <%= @file_tag %> diff --git a/templates/modload.erb b/templates/modload.erb new file mode 100644 index 0000000..a14a612 --- /dev/null +++ b/templates/modload.erb @@ -0,0 +1,3 @@ +<% @extra_modules.each do |mod| -%> +$ModLoad <%= mod %> +<% end -%> -- cgit v1.2.3