summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-01 09:23:25 -0500
committerLuke Kanies <luke@madstop.com>2008-08-01 09:23:25 -0500
commit9b4218292e06ea4d0b4c07b272653dcf52a24142 (patch)
tree4af9810a08bb9b42763c72f57a84385a4d26dc3a
parente1023def1c0a6f68157b585d2c4ee98e2a608490 (diff)
downloadfacter-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--CHANGELOG3
-rw-r--r--lib/facter/operatingsystemrelease.rb5
2 files changed, 4 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index de4dee9..c52dccf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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