summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorb4ldr <github@johnbond.org>2016-02-22 12:52:07 +0000
committerb4ldr <github@johnbond.org>2016-03-31 15:37:53 -0300
commit3a4abe4f98d4c24989a1def59968cb49d1d26268 (patch)
tree6908974fb30b0b99c8d70c1939511f489d43033e /templates
parent1ddfcea4c298cbe6236622020ec440e5e0633341 (diff)
add options support
fix ruby 1.9 hash correct
Diffstat (limited to 'templates')
-rw-r--r--templates/options.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/options.erb b/templates/options.erb
new file mode 100644
index 0000000..036d31f
--- /dev/null
+++ b/templates/options.erb
@@ -0,0 +1,11 @@
+Dpkg::Options {
+<%- @_options.each_pair do |config, value|
+ if %w(force_confdef force_confold force_confnew force_confmiss).include?(config) then
+ if value then -%>
+ "--<%= config.sub('_','-') -%>";
+ <%- end
+ else
+ scope.function_fail(["#{config} not a valid key for $unattended_upgrades::options"])
+ end
+end -%>
+}