summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/facter/hardwaremodel.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/facter/hardwaremodel.rb b/lib/facter/hardwaremodel.rb
index 2118ad4..92f8257 100644
--- a/lib/facter/hardwaremodel.rb
+++ b/lib/facter/hardwaremodel.rb
@@ -4,5 +4,10 @@ end
Facter.add(:hardwaremodel) do
confine :operatingsystem => :aix
- setcode 'lsattr -El proc0 -a type|cut -f2 -d" "'
+ setcode do
+ model = Facter::Util::Resolution.exec('lsattr -El sys0 -a modelname')
+ if model =~ /modelname\s(\S+)\s/
+ $1
+ end
+ end
end