From 8a9070c863f569256272698c69a8e51d1d7b0928 Mon Sep 17 00:00:00 2001 From: "Christopher H. Laco" Date: Mon, 26 May 2014 21:15:08 -0400 Subject: [PATCH] Ensure /etc/rpc-release ends in line-feed Unlike other release files in /etc, the rpc-release did not have a proper line-feed at the end of the file. - Change version recipe to add LF to /etc/rpc-release Issue rcbops/chef-cookbooks#938 (cherry picked from commit af1beef8f04436ea0219449a778d0b83fdf779aa) --- recipes/version.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/version.rb b/recipes/version.rb index 10686f2..d9658ee 100644 --- a/recipes/version.rb +++ b/recipes/version.rb @@ -18,8 +18,10 @@ # # drop the version of this converged release into a file for support purposes +version_string = run_context.cookbook_collection[cookbook_name].metadata.version + file "/etc/rpc-release" do - content run_context.cookbook_collection[cookbook_name].metadata.version + content "#{version_string}\n" mode "0644" owner "root" group "root"