diff options
author | Christoffer Stokbaek <christoffers@easyspeedy.com> | 2016-08-26 16:35:17 +0200 |
---|---|---|
committer | Christoffer Stokbaek <christoffers@easyspeedy.com> | 2016-08-26 16:35:17 +0200 |
commit | 451ea95d70ca2773e6f7813a52627f622498589b (patch) | |
tree | 78d66c092d8fba1d05b9677619a4f577f8d66acf /lib/oxidized/model | |
parent | 2e3eb45f19b9c40353705df19a8e0a316fd314c6 (diff) |
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 |