We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0537002 + 9dbfc1c commit d2864e8Copy full SHA for d2864e8
lib/facter/lvm_support.rb
@@ -15,8 +15,10 @@
15
Facter.add('lvm_vgs') do
16
confine :lvm_support => true
17
18
- vgs = Facter::Core::Execution.execute('vgs -o name --noheadings 2>/dev/null', timeout: 30)
19
-
+ if Facter.value(:lvm_support)
+ vgs = Facter::Core::Execution.execute('vgs -o name --noheadings 2>/dev/null', timeout: 30)
20
+ end
21
+
22
if vgs.nil?
23
setcode { 0 }
24
else
@@ -46,8 +48,9 @@
46
48
pv_list = []
47
49
Facter.add('lvm_pvs') do
50
- pvs = Facter::Core::Execution.execute('pvs -o name --noheadings 2>/dev/null', timeout: 30)
51
52
+ pvs = Facter::Core::Execution.execute('pvs -o name --noheadings 2>/dev/null', timeout: 30)
53
54
55
if pvs.nil?
56
0 commit comments