From 8ac9d4cc9910af53d3e7c9e9536ed7a77d4d7122 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 22 Mar 2016 18:12:21 -0300 Subject: Fix deprecation warnings at sys template --- templates/sys.conf.erb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/sys.conf.erb b/templates/sys.conf.erb index b8a542a..3761167 100644 --- a/templates/sys.conf.erb +++ b/templates/sys.conf.erb @@ -3,11 +3,10 @@ # the next time Puppet runs. Please make configuration changes to this # service in Puppet. -<% %w{parentdir packagesfile partitionsfile hardwarefile}.each do |v| - if send(v) - -%><%= v + ' = ' + send(v) + "\n" %><% - end -end -%> +<%= 'parentdir = '+ @parentdir if @parentdir %> +<%= 'packagesfile = '+ @packagesfile if @packagesfile %> +<%= 'partitionsfile = '+ @partitionsfile if @partitionsfile %> +<%= 'hardwarefile = '+ @hardwarefile if @hardwarefile %> packages = <%= @packages ? 'yes' : 'no' %> partitions = <%= @partitions ? 'yes' : 'no' %> -- cgit v1.2.3