dhcp: Changed dhcpd to run in chroot on CentOS/RedHat 6.
This commit is contained in:
parent
63b16c07f5
commit
e2a674ea06
2 changed files with 8 additions and 2 deletions
|
@ -82,10 +82,10 @@ class dhcp::server::common {
|
|||
|
||||
if $dhcp_server_interface {
|
||||
case $::operatingsystem {
|
||||
"fedora","centos","redhat": {
|
||||
"centos","redhat": {
|
||||
file { "/etc/sysconfig/dhcpd":
|
||||
ensure => present,
|
||||
content => "DHCPDARGS=${dhcp_server_interface}\n",
|
||||
content => template("dhcp/dhcpd.sysconfig"),
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
|
|
6
dhcp/templates/dhcpd.sysconfig
Normal file
6
dhcp/templates/dhcpd.sysconfig
Normal file
|
@ -0,0 +1,6 @@
|
|||
<% if @operatingsystemrelease =~ /^6\./ -%>
|
||||
DHCPDARGS="-chroot ${statedir} -lf /dhcpd.leases -pf /dhcpd.pid <%= @dhcp_server_interface %>"
|
||||
pidfile="${statedir}/dhcpd.pid"
|
||||
<% else -%>
|
||||
DHCPDARGS="<%= @dhcp_server_interface %>"
|
||||
<% end -%>
|
Loading…
Add table
Reference in a new issue