summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Drake <rfdrake@users.noreply.github.com>2017-04-20 21:15:25 -0400
committerRobert Drake <rfdrake@users.noreply.github.com>2017-04-20 21:15:55 -0400
commit278f92c7dc1edfe1e64a2791d36bc36960c9c936 (patch)
tree9372612447bd52abf820dbc286e132a31d6d5842
parent835041e39a854f7a7d0903fc3b93cfb5882dbbc3 (diff)
added firmware version to airos
-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