X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d99ef278bbfbce480d2ba25e7719d804c1684cbf..06a63ff483490efca4bc271b0ece80d58ab2ce51:/cookbooks/sysfs/recipes/default.rb diff --git a/cookbooks/sysfs/recipes/default.rb b/cookbooks/sysfs/recipes/default.rb index f0290d4e7..1b9fc7004 100644 --- a/cookbooks/sysfs/recipes/default.rb +++ b/cookbooks/sysfs/recipes/default.rb @@ -28,18 +28,18 @@ template "/etc/sysfs.conf" do source "sysfs.conf.erb" owner "root" group "root" - mode 0644 + mode 0o644 notifies :restart, "service[sysfsutils]" end node[:sysfs].each_value do |group| - group[:parameters].each do |key,value| + group[:parameters].each do |key, value| sysfs_file = "/sys/#{key}" file sysfs_file do content "#{value}\n" atomic_update false - only_if { File.exists?(sysfs_file) } + only_if { File.exist?(sysfs_file) } end end end