]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
let's see if we can make the lspci test quiet
authorStephen Gran <steve@lobefin.net>
Sun, 2 Aug 2009 01:21:30 +0000 (02:21 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 2 Aug 2009 01:21:30 +0000 (02:21 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidarray.rb

index 8a09a71ca76c464d12db88d1cb5d9d982e2d27cd..d7bf8a9e864329a54d7f8f2b7cae9d9f75ae89ab 100644 (file)
@@ -4,7 +4,7 @@ Facter.add("smartarraycontroller") do
        setcode do
                ishp = "false"
                lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
-               if $?.exitstatus == 0
+               if (($?.exitstatus == 0) && (FileTest.exist?("/proc/bus/pci")))
                        %x{lspci 2>&1}.each { |s|
                                ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
                        }