Skip to content
Snippets Groups Projects
Commit d6e5ac60 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Allow users to omit specific options from dsm.{opt,sys}.

This allows users of the tsmclient definition to specify a value of an
option (in the 'optoptions' and 'sysoptions' parameters) as `false'.
Doing so will cause that option to be omitted from dsm.opt/dsm.sys,
even if it has a value in tsmclient::config::default_{opt,sys}options.
parent 0c4d40dd
No related branches found
No related tags found
No related merge requests found
...@@ -32,12 +32,14 @@ ...@@ -32,12 +32,14 @@
* - optoptions * - optoptions
* Hash of options to set in dsm.opt. Option names must be specified * Hash of options to set in dsm.opt. Option names must be specified
* in lowercase. This is merged with the default_optoptions parameter * in lowercase. This is merged with the default_optoptions parameter
* of the tsmclient::config class. * of the tsmclient::config class. Setting an option to false will
* cause it to be omitted from dsm.opt.
* *
* - sysoptions * - sysoptions
* Hash of options to set in dsm.sys. Option names must be specified * Hash of options to set in dsm.sys. Option names must be specified
* in lowercase. This is merged with the default_sysoptions parameter * in lowercase. This is merged with the default_sysoptions parameter
* of the tsmclient::config class. * of the tsmclient::config class. Setting an option to false will
* cause it to be omitted from dsm.sys.
* Some options are forbidden to set this way, as this define expects * Some options are forbidden to set this way, as this define expects
* them to have certain values. * them to have certain values.
......
...@@ -29,6 +29,8 @@ options.merge!(mandatory) ...@@ -29,6 +29,8 @@ options.merge!(mandatory)
-%> -%>
SERVERNAME <%= @tsm_servername.upcase %> SERVERNAME <%= @tsm_servername.upcase %>
<% options.keys.sort.each do |optname| -%> <% options.sort.each do |optname,optvalue| -%>
<%= sprintf("%-24s %s", optname.to_s, options[optname]).strip %> <% if optvalue -%>
<%= sprintf("%-24s %s", optname.to_s, optvalue).strip %>
<% end -%>
<% end %> <% end %>
...@@ -35,6 +35,8 @@ options.merge!(mandatory) ...@@ -35,6 +35,8 @@ options.merge!(mandatory)
-%> -%>
SERVERNAME <%= @tsm_servername.upcase %> SERVERNAME <%= @tsm_servername.upcase %>
NODENAME <%= @tsm_nodename %> NODENAME <%= @tsm_nodename %>
<% options.keys.sort.each do |optname| -%> <% options.sort.each do |optname,optvalue| -%>
<%= sprintf("%-24s %s", optname.to_s, options[optname]).strip %> <% if optvalue -%>
<%= sprintf("%-24s %s", optname.to_s, optvalue).strip %>
<% end -%>
<% end %> <% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment