meta-stx: re-name and re-org to align with upstream
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-support / puppet / files / puppet-dnsmasq / 0001-puppet-dnsmasq-Kilo-quilt-patches.patch
diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-dnsmasq/0001-puppet-dnsmasq-Kilo-quilt-patches.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-dnsmasq/0001-puppet-dnsmasq-Kilo-quilt-patches.patch
new file mode 100644 (file)
index 0000000..ff631ec
--- /dev/null
@@ -0,0 +1,116 @@
+From 7430149d3a7f1ab9f93ec863e55cdf6d96cd4f06 Mon Sep 17 00:00:00 2001
+From: Al Bailey <al.bailey@windriver.com>
+Date: Tue, 7 Jun 2016 10:22:23 -0400
+Subject: [PATCH] puppet-dnsmasq Kilo quilt patches
+
+---
+ packstack/puppet/modules/dnsmasq/manifests/init.pp          | 8 ++++++++
+ packstack/puppet/modules/dnsmasq/manifests/params.pp        | 7 +++++--
+ packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb | 9 ++++++---
+ 3 files changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/packstack/puppet/modules/dnsmasq/manifests/init.pp b/packstack/puppet/modules/dnsmasq/manifests/init.pp
+index 176bec7..c61fd94 100644
+--- a/packstack/puppet/modules/dnsmasq/manifests/init.pp
++++ b/packstack/puppet/modules/dnsmasq/manifests/init.pp
+@@ -258,6 +258,13 @@
+ #   If you don't want dnsmasq to read /etc/hosts, set this to true.
+ #   Default: false
+ #
++# [*dhcp_hostsfile*]
++#   Read DHCP host information from the specified file. The file contains
++#   information about one host per line. The format of a line is the same
++#   as text to the right of '=' in --dhcp-host. The advantage of storing
++#   DHCP host information in this file is that it can be changed without
++#   re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP.
++#
+ # [*addn_hosts*]
+ #   If you want dnsmasq to read another file/s, as well as /etc/hosts, use this.
+ #   It can be an array of files to read. See next option to manage these files with
+@@ -457,6 +464,7 @@ class dnsmasq (
+   $no_poll             = params_lookup( 'no_poll' ),
+   $bind_interfaces     = params_lookup( 'bind_interfaces' ),
+   $no_hosts            = params_lookup( 'no_hosts' ),
++  $dhcp_hostsfile      = params_lookup( 'dhcp_hostsfile' ),
+   $addn_hosts          = params_lookup( 'addn_hosts' ),
+   $addn_hosts_dir      = params_lookup( 'addn_hosts_dir' ),
+   $expand_hosts        = params_lookup( 'expand_hosts' ),
+diff --git a/packstack/puppet/modules/dnsmasq/manifests/params.pp b/packstack/puppet/modules/dnsmasq/manifests/params.pp
+index 5b8f02d..6dd5b96 100644
+--- a/packstack/puppet/modules/dnsmasq/manifests/params.pp
++++ b/packstack/puppet/modules/dnsmasq/manifests/params.pp
+@@ -38,6 +38,7 @@ class dnsmasq::params {
+   $process_user = $::operatingsystem ? {
+     /(?i:Debian|Ubuntu|Mint)/ => 'dnsmasq',
++    /(?i:wrlinux)/            => 'root',
+     default                   => 'nobody',
+   }
+@@ -62,7 +63,7 @@ class dnsmasq::params {
+   }
+   $config_file_init = $::operatingsystem ? {
+-    /(?i:Debian|Ubuntu|Mint)/ => '/etc/default/dnsmasq',
++    /(?i:Debian|Ubuntu|Mint|wrlinux)/ => '/etc/default/dnsmasq',
+     default                   => '/etc/sysconfig/dnsmasq',
+   }
+@@ -90,6 +91,7 @@ class dnsmasq::params {
+   $no_poll = false
+   $bind_interfaces = false
+   $no_hosts = false
++  $dhcp_hostsfile = ''
+   $addn_hosts = ''
+   $addn_hosts_dir = ''
+   $expand_hosts = false
+@@ -115,6 +117,7 @@ class dnsmasq::params {
+   }
+   $mx_target = ''
+   $localmx = false
++  $selfmx = false
+   $server = ''
+   $local = ''
+   $address = ''
+@@ -151,7 +154,7 @@ class dnsmasq::params {
+   $version = 'present'
+   $absent = false
+   $disable = false
+-  $disableboot = false
++  $disableboot = true
+   ### General module variables that can have a site or per module default
+   $monitor = false
+diff --git a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
+index 7bc4a03..ea5aa01 100644
+--- a/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
++++ b/packstack/puppet/modules/dnsmasq/templates/dnsmasq.conf.erb
+@@ -3,12 +3,12 @@
+ <% if scope.lookupvar('dnsmasq::port') != '' -%>
+ port=<%= scope.lookupvar('dnsmasq::port') %>
+ <% end -%>
+-<% if scope.lookupvar('dnsmasq::bool_domain_need') -%> 
+-domain-needed
+-<% end -%>
+ <% if scope.lookupvar('dnsmasq::bool_bogus_priv') -%>
+ bogus-priv
+ <% end -%>
++<% if scope.lookupvar('dnsmasq::bool_domain_needed') -%>
++domain-needed
++<% end -%>
+ <% if scope.lookupvar('dnsmasq::bool_filterwin2k') -%>
+ filterwin2k
+ <% end -%>
+@@ -33,6 +33,9 @@ bind-interfaces
+ <% if scope.lookupvar('dnsmasq::bool_no_hosts') -%>
+ no-hosts
+ <% end -%>
++<% if scope.lookupvar('dnsmasq::dhcp_hostsfile') != '' -%>
++dhcp-hostsfile=<%= scope.lookupvar('dnsmasq::dhcp_hostsfile') %>
++<% end -%>
+ <% if scope.lookupvar('dnsmasq::bool_expand_hosts') -%>
+ expand-hosts
+ <% end -%>
+-- 
+1.8.3.1
+