Sha256: ff22584d27b2c54324f70235c4be603bf457d6c3a81b0176322e55cb62114ca3

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

class Airos < Oxidized::Model
  using Refinements

  # 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
  end

  cfg :ssh do
    exec true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oxidized-0.31.0 lib/oxidized/model/airos.rb
oxidized-0.30.1 lib/oxidized/model/airos.rb
oxidized-0.30.0 lib/oxidized/model/airos.rb
oxidized-0.29.1 lib/oxidized/model/airos.rb