diff options
author | ytti <saku@ytti.fi> | 2017-04-21 14:24:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 14:24:49 +0300 |
commit | 885ac8cc23dd0c04dc5f157157fb8b71f19ae892 (patch) | |
tree | 9372612447bd52abf820dbc286e132a31d6d5842 /lib/oxidized/model/airos.rb | |
parent | 835041e39a854f7a7d0903fc3b93cfb5882dbbc3 (diff) | |
parent | 278f92c7dc1edfe1e64a2791d36bc36960c9c936 (diff) |
Merge pull request #820 from rfdrake/master
added firmware version to airos
Diffstat (limited to 'lib/oxidized/model/airos.rb')
-rw-r--r-- | lib/oxidized/model/airos.rb | 13 |
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 |