diff options
author | ytti <saku@ytti.fi> | 2016-08-26 18:04:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-26 18:04:42 +0300 |
commit | 34f9baf4cc7e95eda848f3362b76118cd5a8c5e7 (patch) | |
tree | 78d66c092d8fba1d05b9677619a4f577f8d66acf /lib/oxidized/model | |
parent | 2e3eb45f19b9c40353705df19a8e0a316fd314c6 (diff) | |
parent | 451ea95d70ca2773e6f7813a52627f622498589b (diff) |
Merge pull request #541 from stokbaek/master
pfSense: config pull will not remove its revision time
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/pfsense.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/oxidized/model/pfsense.rb b/lib/oxidized/model/pfsense.rb index 8cb0118..9982d72 100644 --- a/lib/oxidized/model/pfsense.rb +++ b/lib/oxidized/model/pfsense.rb @@ -2,21 +2,12 @@ class PfSense < Oxidized::Model # use other use than 'admin' user, 'admin' user cannot get ssh/exec. See issue #535 - 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' + cmd 'cat /cf/conf/config.xml' do |cfg| + cfg.gsub! /\s<revision>\s*<time>\d*<\/time>\s*.*\s*.*\s*<\/revision>/, '' end cfg :ssh do |