Skip to content

Commit d12fb74

Browse files
committed
scripts/augeas/nutupsdconf.aug.in: handle "upsd.conf" keywords introduced between NUT 2.6.5 and 2.8.2 [#2294]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 4c11286 commit d12fb74

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

scripts/augeas/nutupsdconf.aug.in

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Module: NutUpsdConf
44

55
Author: Raphael Pinson <raphink@gmail.com>
66
Frederic Bohe <fredericbohe@eaton.com>
7-
Arnaud Quette <arnaud.quette@gmail.com>
7+
Arnaud Quette <arnaud.quette@gmail.com>
8+
Jim Klimov <jimklimov+nut@gmail.com>
89

910
About: License
1011
This file is licensed under the GPL.
@@ -37,24 +38,36 @@ let word = /[^"#; \t\n]+/
3738
let empty = Util.empty
3839
let comment = Util.comment
3940
let path = word
41+
(* TOTHINK: What if we have spaces? Is "word" good? *)
42+
let certname = word
43+
let dbpass = word
4044

45+
let upsd_debug_min = [ opt_spc . key "DEBUG_MIN" . sep_spc . store num . eol ]
4146
let upsd_maxage = [ opt_spc . key "MAXAGE" . sep_spc . store num . eol ]
4247
let upsd_trackingdelay = [ opt_spc . key "TRACKINGDELAY" . sep_spc . store num . eol ]
4348
let upsd_allow_no_device = [ opt_spc . key "ALLOW_NO_DEVICE" . sep_spc . store num . eol ]
4449
let upsd_allow_not_all_listeners = [ opt_spc . key "ALLOW_NOT_ALL_LISTENERS" . sep_spc . store num . eol ]
50+
let upsd_disable_weak_ssl = [ opt_spc . key "DISABLE_WEAK_SSL" . sep_spc . store num . eol ]
4551
let upsd_statepath = [ opt_spc . key "STATEPATH" . sep_spc . store path . eol ]
4652
let upsd_listen = [ opt_spc . key "LISTEN" . sep_spc
4753
. [ label "interface" . store ip ]
4854
. [ sep_spc . label "port" . store num]? ]
4955
let upsd_listen_list = upsd_listen . eol
50-
let upsd_maxconn = [ opt_spc . key "MAXCONN" . sep_spc . store num . eol ]
56+
let upsd_maxconn = [ opt_spc . key "MAXCONN" . sep_spc . store num . eol ]
5157
let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
58+
let upsd_certpath = [ opt_spc . key "CERTPATH" . sep_spc . store path . eol ]
59+
let upsd_certident = [ opt_spc . key "CERTIDENT" . sep_spc
60+
. [ label "certname" . store certname ]
61+
. [ sep_spc . label "dbpass" . store dbpass ] . eol ]
62+
let upsd_certrequest = [ opt_spc . key "CERTREQUEST" . sep_spc . store num . eol ]
5263

5364
(************************************************************************
65+
* DEBUG_MIN level
5466
* MAXAGE seconds
5567
* TRACKINGDELAY seconds
5668
* ALLOW_NO_DEVICE Boolean
5769
* ALLOW_NOT_ALL_LISTENERS Boolean
70+
* DISABLE_WEAK_SSL Boolean
5871
* STATEPATH path
5972
* LISTEN interface port
6073
* Multiple lines each with one LISTEN address (or host name) and an optional
@@ -65,9 +78,23 @@ let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
6578
* LISTEN 192.168.50.1
6679
* LISTEN ::1
6780
* LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344
81+
* MAXCONN count
82+
* CERTFILE path
83+
* Single certificate file (SSL with OpenSSL)
84+
* CERTPATH path
85+
* Path to certificate database split into 3 files (SSL with NSS)
86+
* CERTIDENT certname dbpass
87+
* Certificate identity to use by the server, and database password
88+
* as needed to read it (SSL with NSS)
89+
* CERTREQUEST level
90+
* Request or require client cert? (SSL with NSS)
91+
* Possible values are :
92+
* - 0 to not request to clients to provide any certificate
93+
* - 1 to require to all clients a certificate
94+
* - 2 to require to all clients a valid certificate
6895
*
6996
*************************************************************************)
70-
let upsd_other = upsd_maxage | upsd_trackingdelay | upsd_allow_no_device | upsd_allow_not_all_listeners | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile
97+
let upsd_other = upsd_debug_min | upsd_maxage | upsd_trackingdelay | upsd_allow_no_device | upsd_allow_not_all_listeners | upsd_disable_weak_ssl | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile | upsd_certpath | upsd_certident | upsd_certrequest
7198

7299
let upsd_lns = (upsd_other|comment|empty)*
73100

0 commit comments

Comments
 (0)