From: | "Benedikt Boehm (hollow)" <hollow@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in dev-ruby/ohai/files: ohai-lsb-release.patch |
Date: | Sat, 03 Jul 2010 12:28:02 |
Message-Id: | 20100703121039.355862C5F4@corvid.gentoo.org |
1 | hollow 10/07/03 12:10:38 |
2 | |
3 | Added: ohai-lsb-release.patch |
4 | Log: |
5 | initial ebuild, thanks to Gábor Vészi |
6 | (Portage version: 2.2_rc67/cvs/Linux i686) |
7 | |
8 | Revision Changes Path |
9 | 1.1 dev-ruby/ohai/files/ohai-lsb-release.patch |
10 | |
11 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/ohai/files/ohai-lsb-release.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/ohai/files/ohai-lsb-release.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: ohai-lsb-release.patch |
15 | =================================================================== |
16 | --- a/lib/ohai/plugins/linux/lsb.rb |
17 | +++ b/lib/ohai/plugins/linux/lsb.rb |
18 | @@ -23,13 +23,13 @@ lsb Mash.new |
19 | begin |
20 | File.open("/etc/lsb-release").each do |line| |
21 | case line |
22 | - when /^DISTRIB_ID=(.+)$/ |
23 | + when /^DISTRIB_ID=["']?(.+?)["']?$/ |
24 | lsb[:id] = $1 |
25 | - when /^DISTRIB_RELEASE=(.+)$/ |
26 | + when /^DISTRIB_RELEASE=["']?(.+?)["']?$/ |
27 | lsb[:release] = $1 |
28 | - when /^DISTRIB_CODENAME=(.+)$/ |
29 | + when /^DISTRIB_CODENAME=["']?(.+?)["']?$/ |
30 | lsb[:codename] = $1 |
31 | - when /^DISTRIB_DESCRIPTION=(.+)$/ |
32 | + when /^DISTRIB_DESCRIPTION=["']?(.+?)["']?$/ |
33 | lsb[:description] = $1 |
34 | end |
35 | end |