forked from DGNum/liminix
inline write-{addresses,prefixes}
This commit is contained in:
parent
3e163d4253
commit
4bd3ccc8fd
1 changed files with 3 additions and 7 deletions
|
@ -34,11 +34,6 @@
|
|||
(each [k v (pairs address)]
|
||||
(write-value (.. keydir "/" k) v)))))
|
||||
|
||||
(fn write-addresses [addresses]
|
||||
(write-addresses-thing "address/" addresses))
|
||||
|
||||
(fn write-prefixes [prefixes]
|
||||
(write-addresses-thing "prefix/" prefixes))
|
||||
|
||||
;; we remove state before updating to ensure that consumers don't get
|
||||
;; a half-updated snapshot
|
||||
|
@ -79,8 +74,9 @@
|
|||
]]
|
||||
(each [_ n (ipairs wanted)]
|
||||
(write-value-from-env n))
|
||||
(write-addresses (os.getenv :ADDRESSES))
|
||||
(write-prefixes (os.getenv :PREFIXES)))
|
||||
|
||||
(write-addresses-thing "address/" (os.getenv :ADDRESSES))
|
||||
(write-addresses-thing "prefix/" (os.getenv :PREFIXES)))
|
||||
|
||||
(let [[ifname state] arg
|
||||
ready (match state
|
||||
|
|
Loading…
Reference in a new issue