integ/config/puppet-modules/puppet-dnsmasq/debian/patches/0001-puppet-dnsmasq-Kilo-quilt-patches.patch
Dan Voiculeasa 615a3a2c60 Add debian package for puppet-dnsmasq module
Package latest puppet-dnsmasq from the same repo as the one used on
CentOS 7.

Remains to be tested to see if this works with Puppet 5.

Did build-pkgs. Did build-image.

Story: 2009101
Task: 43257
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I34576ecdd89986c5948e0ed74a9afbb9a7fd9f82
2021-09-28 12:00:44 +03:00

117 lines
3.8 KiB
Diff

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
---
manifests/init.pp | 8 ++++++++
manifests/params.pp | 7 +++++--
templates/dnsmasq.conf.erb | 9 ++++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/manifests/init.pp b/manifests/init.pp
index 176bec7..c61fd94 100644
--- a/manifests/init.pp
+++ b/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/manifests/params.pp b/manifests/params.pp
index 5b8f02d..6dd5b96 100644
--- a/manifests/params.pp
+++ b/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/templates/dnsmasq.conf.erb b/templates/dnsmasq.conf.erb
index 7bc4a03..ea5aa01 100644
--- a/templates/dnsmasq.conf.erb
+++ b/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