summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-03-14 13:57:32 +1100
committerJames Turnbull <james@lovedthanlost.net>2011-03-15 11:41:51 +1100
commit2e48e189910f75cc1a6586bbecda27ecbd0afc8e (patch)
treed9c667853cc7c2c67a8fd0797322a4c1647992c7 /lib
parent469d2a26a467c50af9f9732d7f98e8a01ecc369f (diff)
downloadfacter-2e48e189910f75cc1a6586bbecda27ecbd0afc8e.tar.gz
facter-2e48e189910f75cc1a6586bbecda27ecbd0afc8e.tar.xz
facter-2e48e189910f75cc1a6586bbecda27ecbd0afc8e.zip
Fixed #6695 - Updated id fact for Darwin et al
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/id.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/facter/id.rb b/lib/facter/id.rb
index c2c3594..1c42284 100644
--- a/lib/facter/id.rb
+++ b/lib/facter/id.rb
@@ -1,15 +1,8 @@
Facter.add(:id) do
- confine :operatingsystem => %w{Linux Fedora RedHat CentOS SuSE SLES Debian Ubuntu Gentoo AIX OEL OVS GNU/kFreeBSD windows}
setcode "whoami"
end
Facter.add(:id) do
- confine :operatingsystem => %w{Solaris}
- setcode do
- if %x{id} =~ /^uid=\d+\((\S+)\)/
- $1
- else
- nil
- end
- end
+ confine :kernel => :SunOS
+ setcode "/usr/xpg4/bin/id -un"
end