diff options
author | Luke Kanies <luke@madstop.com> | 2008-08-01 09:23:25 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-08-01 09:23:25 -0500 |
commit | 9b4218292e06ea4d0b4c07b272653dcf52a24142 (patch) | |
tree | 4af9810a08bb9b42763c72f57a84385a4d26dc3a | |
parent | e1023def1c0a6f68157b585d2c4ee98e2a608490 (diff) | |
download | facter-9b4218292e06ea4d0b4c07b272653dcf52a24142.tar.gz facter-9b4218292e06ea4d0b4c07b272653dcf52a24142.tar.xz facter-9b4218292e06ea4d0b4c07b272653dcf52a24142.zip |
Modified the operatingsystem fact for Debian so it looks in
/etc/debian_version instead of /proc/version.
Applied patch by marthag.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | lib/facter/operatingsystemrelease.rb | 5 |
2 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,7 @@ 1.5.x: + Modified the operatingsystem fact for Debian so it looks in + /etc/debian_version instead of /proc/version. + Fixes #1467 - macaddress not set on Ubuntu 1.5.0: diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/operatingsystemrelease.rb index 843dfdb..7aeeb1e 100644 --- a/lib/facter/operatingsystemrelease.rb +++ b/lib/facter/operatingsystemrelease.rb @@ -41,10 +41,7 @@ end Facter.add(:operatingsystemrelease) do confine :operatingsystem => %w{Debian} setcode do - release = Facter::Util::Resolution.exec('cat /proc/version') - if release =~ /\(Debian (\d+.\d+).\d+-\d+\)/ - $1 - end + release = Facter::Util::Resolution.exec('cat /etc/debian_version') end end |