summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/airos.rb
diff options
context:
space:
mode:
authorMatthias Cramer <matthias.cramer@iway.ch>2017-06-16 11:52:47 +0200
committerMatthias Cramer <matthias.cramer@iway.ch>2017-06-16 11:52:47 +0200
commitb7569965d1ec6112d0cd588ebd0b13a541bb6ef7 (patch)
treefbf410ebdfc268e55df73571fc85c426e8b25dbf /lib/oxidized/model/airos.rb
parentbb06ac367daeed2f11682b8ef6e1182923570b42 (diff)
parentdc425ce5bc3143cf4b8322602d7b7521aca37134 (diff)
Merge branch 'master' of https://github.com/ytti/oxidized
Diffstat (limited to 'lib/oxidized/model/airos.rb')
-rw-r--r--lib/oxidized/model/airos.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/oxidized/model/airos.rb b/lib/oxidized/model/airos.rb
index 775005f..7d82956 100644
--- a/lib/oxidized/model/airos.rb
+++ b/lib/oxidized/model/airos.rb
@@ -1,14 +1,19 @@
class Airos < Oxidized::Model
# Ubiquiti AirOS circa 5.x
-
+
prompt /^[^#]+# /
-
+ comment '# '
+
cmd 'cat /etc/board.info' do |cfg|
cfg.split("\n").map { |line| "# #{line}" }.join("\n") + "\n"
end
-
+
+ cmd 'cat /etc/version' do |cfg|
+ comment "airos version: #{cfg}"
+ end
+
cmd 'sort /tmp/system.cfg'
-
+
cmd :secret do |cfg|
cfg.gsub! /^(users\.\d+\.password|snmp\.community)=.+/, "# \\1=<hidden>"
cfg