blob: e67e4f61dd12c1b919422b4d8b000bd835555ac6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- a/lib/ohai/plugins/linux/lsb.rb
+++ b/lib/ohai/plugins/linux/lsb.rb
@@ -23,13 +23,13 @@ lsb Mash.new
begin
File.open("/etc/lsb-release").each do |line|
case line
- when /^DISTRIB_ID=(.+)$/
+ when /^DISTRIB_ID=["']?(.+?)["']?$/
lsb[:id] = $1
- when /^DISTRIB_RELEASE=(.+)$/
+ when /^DISTRIB_RELEASE=["']?(.+?)["']?$/
lsb[:release] = $1
- when /^DISTRIB_CODENAME=(.+)$/
+ when /^DISTRIB_CODENAME=["']?(.+?)["']?$/
lsb[:codename] = $1
- when /^DISTRIB_DESCRIPTION=(.+)$/
+ when /^DISTRIB_DESCRIPTION=["']?(.+?)["']?$/
lsb[:description] = $1
end
end
|