summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2017-02-22 18:17:04 +0000
committerMicah <micah@riseup.net>2017-02-22 18:17:04 +0000
commit7aff745103df5771eac023f90ddfbab03dcd7600 (patch)
tree2f446d7014d14285874321f1878a6086c2e0c3a9 /lib
parent4da1590e18c487f1dc89d0ce1fffeb848e75794e (diff)
parentb131814ed976c2034521a460b6790f78703d8f2f (diff)
Merge branch '5.x-3' into 'master'
5.x part 3 See merge request !9
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/shorewall_major_version.rb3
-rw-r--r--lib/facter/shorewall_version.rb3
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/facter/shorewall_major_version.rb b/lib/facter/shorewall_major_version.rb
index 0068b48..9b4c9a2 100644
--- a/lib/facter/shorewall_major_version.rb
+++ b/lib/facter/shorewall_major_version.rb
@@ -1,5 +1,6 @@
Facter.add("shorewall_major_version") do
+ confine :shorewall_version => /\d/
setcode do
- Facter::Util::Resolution.exec('shorewall version').split('.').first || nil
+ Facter.value(:shorewall_version).split('.').first
end
end
diff --git a/lib/facter/shorewall_version.rb b/lib/facter/shorewall_version.rb
new file mode 100644
index 0000000..3c1cc67
--- /dev/null
+++ b/lib/facter/shorewall_version.rb
@@ -0,0 +1,3 @@
+Facter.add("shorewall_version") do
+ setcode 'shorewall version'
+end