diff options
author | Lebedev Vadim <abraham1901@gmail.com> | 2016-06-29 18:54:03 +0300 |
---|---|---|
committer | Lebedev Vadim <abraham1901@gmail.com> | 2016-06-29 18:54:03 +0300 |
commit | 3b623df1f88adf2a177829dacae822dec2c3c7d0 (patch) | |
tree | 05a44f1ae387a2cdee74a11d91af1b4826597292 /lib/facter | |
parent | 10576074788edae1c77b0b9c51949bee5a25f1d6 (diff) |
* add shorewal version facter
Diffstat (limited to 'lib/facter')
-rw-r--r-- | lib/facter/shorewall_major_version.rb | 5 |
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 |