diff options
author | ytti <saku@ytti.fi> | 2016-08-05 12:34:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-05 12:34:37 +0300 |
commit | 78c3f085eef73a7fe5cbf3a1290ffd9456642c76 (patch) | |
tree | 03dee0ab33645db346f9f5affff9ee0850d2ed74 | |
parent | 3bcf2ebc61294f2421f69c501440e4040968949a (diff) | |
parent | aad3637ba0ee88778468bd1b8cd36f26e1393b98 (diff) |
Merge pull request #525 from stokbaek/ssh_exec
pfSense support with ssh exec
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lib/oxidized/pfsense.rb | 25 |
2 files changed, 26 insertions, 0 deletions
@@ -123,6 +123,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * Opengear * Palo Alto * PANOS + * pfSense * Quanta * Quanta / VxWorks 6.6 (1.1.0.8) * Supermicro diff --git a/lib/oxidized/pfsense.rb b/lib/oxidized/pfsense.rb new file mode 100644 index 0000000..cd6885c --- /dev/null +++ b/lib/oxidized/pfsense.rb @@ -0,0 +1,25 @@ +class PfSense < Oxidized::Model + + comment '# ' + + #add a comment in the final conf + def add_comment comment + "\n###### #{comment} ######\n" + end + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + #show the persistent configuration + pre do + cfg = add_comment 'Configuration' + cfg += cmd 'cat /cf/conf/config.xml' + end + + cfg :ssh do + exec true + pre_logout 'exit' + end + +end |