Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / puppet / files / puppet-dnsmasq / 0001-puppet-dnsmasq-Kilo-quilt-patches.patch
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
5
6 ---
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(-)
11
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
16 @@ -258,6 +258,13 @@
17  #   If you don't want dnsmasq to read /etc/hosts, set this to true.
18  #   Default: false
19  #
20 +# [*dhcp_hostsfile*]
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.
26 +#
27  # [*addn_hosts*]
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 {
43  
44    $process_user = $::operatingsystem ? {
45      /(?i:Debian|Ubuntu|Mint)/ => 'dnsmasq',
46 +    /(?i:wrlinux)/            => 'root',
47      default                   => 'nobody',
48    }
49  
50 @@ -62,7 +63,7 @@ class dnsmasq::params {
51    }
52  
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',
57    }
58  
59 @@ -90,6 +91,7 @@ class dnsmasq::params {
60    $no_poll = false
61    $bind_interfaces = false
62    $no_hosts = false
63 +  $dhcp_hostsfile = ''
64    $addn_hosts = ''
65    $addn_hosts_dir = ''
66    $expand_hosts = false
67 @@ -115,6 +117,7 @@ class dnsmasq::params {
68    }
69    $mx_target = ''
70    $localmx = false
71 +  $selfmx = false
72    $server = ''
73    $local = ''
74    $address = ''
75 @@ -151,7 +154,7 @@ class dnsmasq::params {
76    $version = 'present'
77    $absent = false
78    $disable = false
79 -  $disableboot = false
80 +  $disableboot = true
81  
82    ### General module variables that can have a site or per module default
83    $monitor = false
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
88 @@ -3,12 +3,12 @@
89  <% if scope.lookupvar('dnsmasq::port') != '' -%>
90  port=<%= scope.lookupvar('dnsmasq::port') %>
91  <% end -%>
92 -<% if scope.lookupvar('dnsmasq::bool_domain_need') -%> 
93 -domain-needed
94 -<% end -%>
95  <% if scope.lookupvar('dnsmasq::bool_bogus_priv') -%>
96  bogus-priv
97  <% end -%>
98 +<% if scope.lookupvar('dnsmasq::bool_domain_needed') -%>
99 +domain-needed
100 +<% end -%>
101  <% if scope.lookupvar('dnsmasq::bool_filterwin2k') -%>
102  filterwin2k
103  <% end -%>
104 @@ -33,6 +33,9 @@ bind-interfaces
105  <% if scope.lookupvar('dnsmasq::bool_no_hosts') -%>
106  no-hosts
107  <% end -%>
108 +<% if scope.lookupvar('dnsmasq::dhcp_hostsfile') != '' -%>
109 +dhcp-hostsfile=<%= scope.lookupvar('dnsmasq::dhcp_hostsfile') %>
110 +<% end -%>
111  <% if scope.lookupvar('dnsmasq::bool_expand_hosts') -%>
112  expand-hosts
113  <% end -%>
114 -- 
115 1.8.3.1
116