Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / facter / root_home.rb
index b4f87ff..87c7657 100644 (file)
@@ -30,3 +30,16 @@ Facter.add(:root_home) do
     hash['dir'].strip
   end
 end
+
+Facter.add(:root_home) do
+  confine :kernel => :aix
+  root_home = nil
+  setcode do
+    str = Facter::Util::Resolution.exec("lsuser -c -a home root")
+    str && str.split("\n").each do |line|
+      next if line =~ /^#/
+      root_home = line.split(/:/)[1]
+    end
+    root_home
+  end
+end