blob: 8cb0118ba2f6d94718b3a42d14d399da7bbed3c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
class PfSense < Oxidized::Model
# use other use than 'admin' user, 'admin' user cannot get ssh/exec. See issue #535
comment '# '
#add a comment in the final conf
def add_comment comment
"\n###### #{comment} ######\n"
end
cmd :all do |cfg|
cfg.each_line.to_a[1..-2].join
end
#show the persistent configuration
pre do
cfg = add_comment 'Configuration'
cfg += cmd 'cat /cf/conf/config.xml'
end
cfg :ssh do
exec true
pre_logout 'exit'
end
end
|