dhcp6c readiness notification
This commit is contained in:
parent
447f068569
commit
fa7e682e87
2 changed files with 9 additions and 0 deletions
|
@ -244,6 +244,7 @@ in rec {
|
||||||
'';
|
'';
|
||||||
in longrun {
|
in longrun {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
notification-fd = 10;
|
||||||
run = ''
|
run = ''
|
||||||
${pkgs.odhcp6c}/bin/odhcp6c -s ${script} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
|
${pkgs.odhcp6c}/bin/odhcp6c -s ${script} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,3 +45,11 @@
|
||||||
]]
|
]]
|
||||||
(each [_ n (ipairs wanted)]
|
(each [_ n (ipairs wanted)]
|
||||||
(write-value-from-env n)))
|
(write-value-from-env n)))
|
||||||
|
|
||||||
|
(let [ready (match state
|
||||||
|
"started" false
|
||||||
|
"unbound" false
|
||||||
|
"stopped" false
|
||||||
|
_ true)]
|
||||||
|
(and ready
|
||||||
|
(with-open [fd (io.open "/proc/self/fd/10" :w)] (fd:write "\n"))))
|
||||||
|
|
Loading…
Reference in a new issue