summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/pfsense.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/pfsense.rb')
-rw-r--r--lib/oxidized/model/pfsense.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/oxidized/model/pfsense.rb b/lib/oxidized/model/pfsense.rb
index cd6885c..c02c0d0 100644
--- a/lib/oxidized/model/pfsense.rb
+++ b/lib/oxidized/model/pfsense.rb
@@ -1,20 +1,14 @@
class PfSense < Oxidized::Model
-
- comment '# '
-
- #add a comment in the final conf
- def add_comment comment
- "\n###### #{comment} ######\n"
- end
+ # use other use than 'admin' user, 'admin' user cannot get ssh/exec. See issue #535
+
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*.*\s*<time>\d*<\/time>\s*.*\s*<\/revision>/, ''
+ cfg
end
cfg :ssh do