liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 210b41efc0b0d3c27297fa4b1da36937d03ab5dd
parent 53c6d506cf1a3fbc8df0e298cf6b988c808fdbe5
Author: Daniel Barlow <dan@telent.net>
Date:   Mon, 31 Mar 2025 23:17:50 +0100

improve robustness of ppp readiness notification

there was a race where ip-up could write ifname and then
ip6-up could write its outputs and then test ifname and
signal ready before ip-up had written the rest of its outputs

Diffstat:
Mmodules/ppp/common.nix | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/ppp/common.nix b/modules/ppp/common.nix @@ -40,15 +40,17 @@ let set +o nounset if test -n "''${DNS1}" ;then echo ''${DNS1} > ns1 ; fi if test -n "''${DNS2}" ;then echo ''${DNS2} > ns2 ; fi - test -e ipv6-address && echo >/proc/self/fd/10 + touch ip-up + test -e ipv6-up && echo >/proc/self/fd/10 ''; ip6-up = writeAshScript "ip6-up" { } '' exec >&5 2>&5 . ${serviceFns} in_outputs ${name} - echo $4 > ipv6-address echo $5 > ipv6-peer-address - test -e ifname && echo >/proc/self/fd/10 + echo $4 > ipv6-address + touch ipv6-up + test -e ip-up && echo >/proc/self/fd/10 ''; literal_or_output = let