1 From 7430149d3a7f1ab9f93ec863e55cdf6d96cd4f06 Mon Sep 17 00:00:00 2001
2 From: Al Bailey <al.bailey@windriver.com>
3 Date: Tue, 7 Jun 2016 10:22:23 -0400
4 Subject: [PATCH] puppet-dnsmasq Kilo quilt patches
7 packstack/puppet/modules/dnsmasq/manifests/init.pp | 8 ++++++++
8 packstack/puppet/modules/dnsmasq/manifests/params.pp | 7 +++++--
9 packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb | 9 ++++++---
10 3 files changed, 19 insertions(+), 5 deletions(-)
12 diff --git a/packstack/puppet/modules/dnsmasq/manifests/init.pp b/packstack/puppet/modules/dnsmasq/manifests/init.pp
13 index 176bec7..c61fd94 100644
14 --- a/packstack/puppet/modules/dnsmasq/manifests/init.pp
15 +++ b/packstack/puppet/modules/dnsmasq/manifests/init.pp
17 # If you don't want dnsmasq to read /etc/hosts, set this to true.
21 +# Read DHCP host information from the specified file. The file contains
22 +# information about one host per line. The format of a line is the same
23 +# as text to the right of '=' in --dhcp-host. The advantage of storing
24 +# DHCP host information in this file is that it can be changed without
25 +# re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP.
28 # If you want dnsmasq to read another file/s, as well as /etc/hosts, use this.
29 # It can be an array of files to read. See next option to manage these files with
30 @@ -457,6 +464,7 @@ class dnsmasq (
31 $no_poll = params_lookup( 'no_poll' ),
32 $bind_interfaces = params_lookup( 'bind_interfaces' ),
33 $no_hosts = params_lookup( 'no_hosts' ),
34 + $dhcp_hostsfile = params_lookup( 'dhcp_hostsfile' ),
35 $addn_hosts = params_lookup( 'addn_hosts' ),
36 $addn_hosts_dir = params_lookup( 'addn_hosts_dir' ),
37 $expand_hosts = params_lookup( 'expand_hosts' ),
38 diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp
39 index 5b8f02d..6dd5b96 100644
40 --- a/packstack/puppet/modules/dnsmasq/manifests/params.pp
41 +++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp
42 @@ -38,6 +38,7 @@ class dnsmasq::params {
44 $process_user = $::operatingsystem ? {
45 /(?i:Debian|Ubuntu|Mint)/ => 'dnsmasq',
46 + /(?i:wrlinux)/ => 'root',
50 @@ -62,7 +63,7 @@ class dnsmasq::params {
53 $config_file_init = $::operatingsystem ? {
54 - /(?i:Debian|Ubuntu|Mint)/ => '/etc/default/dnsmasq',
55 + /(?i:Debian|Ubuntu|Mint|wrlinux)/ => '/etc/default/dnsmasq',
56 default => '/etc/sysconfig/dnsmasq',
59 @@ -90,6 +91,7 @@ class dnsmasq::params {
61 $bind_interfaces = false
63 + $dhcp_hostsfile = ''
67 @@ -115,6 +117,7 @@ class dnsmasq::params {
75 @@ -151,7 +154,7 @@ class dnsmasq::params {
79 - $disableboot = false
82 ### General module variables that can have a site or per module default
84 diff --git a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
85 index 7bc4a03..ea5aa01 100644
86 --- a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
87 +++ b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
89 <% if scope.lookupvar('dnsmasq::port') != '' -%>
90 port=<%= scope.lookupvar('dnsmasq::port') %>
92 -<% if scope.lookupvar('dnsmasq::bool_domain_need') -%>
95 <% if scope.lookupvar('dnsmasq::bool_bogus_priv') -%>
98 +<% if scope.lookupvar('dnsmasq::bool_domain_needed') -%>
101 <% if scope.lookupvar('dnsmasq::bool_filterwin2k') -%>
104 @@ -33,6 +33,9 @@ bind-interfaces
105 <% if scope.lookupvar('dnsmasq::bool_no_hosts') -%>
108 +<% if scope.lookupvar('dnsmasq::dhcp_hostsfile') != '' -%>
109 +dhcp-hostsfile=<%= scope.lookupvar('dnsmasq::dhcp_hostsfile') %>
111 <% if scope.lookupvar('dnsmasq::bool_expand_hosts') -%>