blob: 3ccf887c3663848874d85bdc9b92331d164c2b3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class Airos < Oxidized::Model
# Ubiquiti AirOS circa 5.x
prompt /^[^#]+# /
cmd 'cat /etc/board.info' do |cfg|
cfg.split("\n").map { |line| "# #{line}" }.join("\n") + "\n"
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 unless vars :ssh_no_exec
end
end
|