We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b109787 commit 98373f1Copy full SHA for 98373f1
1 file changed
lib/facter/root_home.rb
@@ -30,3 +30,16 @@ def get_root_home
30
hash['dir'].strip
31
end
32
33
+
34
+Facter.add(:root_home) do
35
+ confine :kernel => :aix
36
+ root_home = nil
37
+ setcode do
38
+ str = Facter::Util::Resolution.exec("lsuser -C -a home root")
39
+ str && str.split("\n").each do |line|
40
+ next if line =~ /#/
41
+ root_home = line.split(/:/)[1]
42
+ end
43
+ root_home
44
45
+end
0 commit comments