commit 12ef421fb2ec5f6c57d82e8c8943c789fa8c81d3
parent 0ffad2df1a97a0f9a65967a71a072c0582390c66
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 10 Aug 2026 13:16:12 +0100
dhcp lease watcher: hold .lock while copying outputs
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/dhcp4c/client.nix b/modules/dhcp4c/client.nix
@@ -78,7 +78,9 @@ longrun {
set -e
echo dhcp lease acquired $(output ${service} ip)
(in_outputs ${controlled-name}
+ touch .lock
cp $(output_path ${service})/* .
+ rm .lock
)
while sleep 86400 ; do true ; done
'';