Sha256: 6f6283e915caaadeac3e16fff43229fe3798774dc73881cb7259f1cbab8b61d6

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

# Fact: id
#
# Purpose: Internal fact used to specity the program to return the currently
# running user id.
#
# Resolution:
#   On all Unixes bar Solaris, just returns "whoami".
#   On Solaris, parses the output of the "id" command to grab the username, as
#   Solaris doesn't have the whoami command.
#
# Caveats:
#

Facter.add(:id) do
    setcode "whoami"
end

Facter.add(:id) do
    confine :kernel => :SunOS
    setcode "/usr/xpg4/bin/id -un"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facter-1.6.1 lib/facter/id.rb
facter-1.6.0 lib/facter/id.rb