~gandelman-a/ubuntu/precise/facter/merge922788

« back to all changes in this revision

Viewing changes to lib/facter/id.rb

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20111018103242-ag8i8vejfp8v7b1b
Tags: upstream-1.6.1
ImportĀ upstreamĀ versionĀ 1.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Fact: id
 
2
#
 
3
# Purpose: Internal fact used to specity the program to return the currently
 
4
# running user id.
 
5
#
 
6
# Resolution:
 
7
#   On all Unixes bar Solaris, just returns "whoami".
 
8
#   On Solaris, parses the output of the "id" command to grab the username, as
 
9
#   Solaris doesn't have the whoami command.
 
10
#
 
11
# Caveats:
 
12
#
 
13
 
1
14
Facter.add(:id) do
2
15
    setcode "whoami"
3
16
end