summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-11-06 17:54:39 -0800
committerGitHub <noreply@github.com>2020-11-06 17:54:39 -0800
commit511d92ce28e40693cdc035913949fc8ef882685a (patch)
tree131e34bcf114c9da1fc5d5a8b8c9174253ccf248
parent2208e36b25a622e0fe5a04a52a7dba5abbbbaa56 (diff)
downloadohai-511d92ce28e40693cdc035913949fc8ef882685a.tar.gz
Update lib/ohai/plugins/linux/hostnamectl.rb
Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
-rw-r--r--lib/ohai/plugins/linux/hostnamectl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/linux/hostnamectl.rb b/lib/ohai/plugins/linux/hostnamectl.rb
index 0c74abcd..8f16e246 100644
--- a/lib/ohai/plugins/linux/hostnamectl.rb
+++ b/lib/ohai/plugins/linux/hostnamectl.rb
@@ -27,7 +27,7 @@ Ohai.plugin(:Hostnamectl) do
if hostnamectl_path
shell_out(hostnamectl_path).stdout.split("\n").each do |line|
key, val = line.split(": ", 2)
- hostnamectl[key.chomp.lstrip.tr(" ", "_").downcase] = val.chomp
+ hostnamectl[key.chomp.lstrip.tr(" ", "_").downcase] = val
end
end
end