Skip to content

Commit 3ffcf4c

Browse files
committed
Hound fixes
1 parent d3492a8 commit 3ffcf4c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

chef/cookbooks/dhcp/libraries/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module DhcpHelper
2-
def self.config_filename(base, ip_version, extension=".conf")
2+
def self.config_filename(base, ip_version, extension = ".conf")
33
if ip_version == "4"
44
"#{base}#{extension}"
55
else

chef/cookbooks/dhcp/providers/subnet.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
filename = "/etc/dhcp3/subnets.d/#{new_resource.subnet}.conf"
1919
template filename do
2020
cookbook "dhcp"
21-
source "#{subnet_template}"
21+
source subnet_template
2222
variables(
2323
network: new_resource.network,
2424
options: new_resource.options,
@@ -32,9 +32,10 @@
3232
notifies :restart, resources(service: "dhcp3-server"), :delayed
3333
end
3434
end
35+
subnet_file = DhcpHelper.config_filename("subnet_list", new_resource.ip_version)
3536
utils_line "include \"#{filename}\";" do
3637
action :add
37-
file "/etc/dhcp3/subnets.d/#{DhcpHelper.config_filename("subnet_list", new_resource.ip_version)}"
38+
file "/etc/dhcp3/subnets.d/#{subnet_file}"
3839
if node[:provisioner][:enable_pxe]
3940
notifies :restart, resources(service: "dhcp3-server"), :delayed
4041
end

chef/cookbooks/dhcp/recipes/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174

175175
service "dhcp3-server" do
176176
if %w(suse rhel).include?(node[:platform_family])
177-
service_name "#{DhcpHelper.config_filename("dhcpd", admin_network.ip_version, "")}"
177+
service_name DhcpHelper.config_filename("dhcpd", admin_network.ip_version, "")
178178
elsif node[:platform] == "ubuntu"
179179
case node[:lsb][:codename]
180180
when "maverick"

0 commit comments

Comments
 (0)