]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/systemd/resources/tmpfile.rb
Qualify property names
[chef.git] / cookbooks / systemd / resources / tmpfile.rb
index 8bf64ae09f6c5ab49ed945c16809564e0afd8982..070a9cc8db3a7496c3fc30cd87eca74f263489cb 100644 (file)
@@ -33,7 +33,7 @@ action :create do
     source "tmpfile.erb"
     owner "root"
     group "root"
-    mode 0644
+    mode 0o644
     variables new_resource.to_hash
   end
 
@@ -52,6 +52,8 @@ action :delete do
   end
 end
 
-def unit_name
-  path.sub(%r{^/}, "").gsub(%r{/}, "-")
+action_class do
+  def unit_name
+    new_resource.path.sub(%r{^/}, "").gsub(%r{/}, "-")
+  end
 end