summaryrefslogtreecommitdiff
path: root/lib/facter
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-01-12 11:29:28 +0100
committermh <mh@immerda.ch>2017-01-12 11:29:28 +0100
commit53fa57dbd5bd1ea0e8da5aaffe509df7a47d1730 (patch)
treeb8027acdad3a0013033210c6f95ebc2b50d42a0c /lib/facter
parent8b20a24773e646a827f5bd9eb6030bfcbf12137d (diff)
parent6d78d6c7b5c7617077260c94d7158b61f430494e (diff)
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'lib/facter')
-rw-r--r--lib/facter/shorewall_major_version.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/facter/shorewall_major_version.rb b/lib/facter/shorewall_major_version.rb
new file mode 100644
index 0000000..a733842
--- /dev/null
+++ b/lib/facter/shorewall_major_version.rb
@@ -0,0 +1,5 @@
+Facter.add("shorewall_major_version") do
+ setcode do
+ Facter::Util::Resolution.exec('shorewall version').split('.')[0] || nil
+ end
+end