mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
refactor(youko): order transmission-netns after the br0 device
Replace the 30 s `ip link show br0` poll with BindsTo/After on sys-subsystem-net-devices-br0.device. Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
1 parent
8d32297dcd
commit
f520c992d5
1 file changed
+2
-8
@@ -210,14 +210,8 @@ in
|
|||||||
systemd.services.transmission-netns = {
|
systemd.services.transmission-netns = {
|
||||||
description = "Network namespace for transmission";
|
description = "Network namespace for transmission";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "systemd-networkd.service" ];
|
bindsTo = [ "sys-subsystem-net-devices-br0.device" ];
|
||||||
preStart = ''
|
after = [ "sys-subsystem-net-devices-br0.device" ];
|
||||||
for _ in $(seq 1 30); do
|
|
||||||
${ip} link show br0 >/dev/null 2>&1 && break
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
${ip} link show br0 >/dev/null 2>&1 || { echo "br0 is not ready" >&2; exit 1; }
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
|||||||
Reference in new issue
Block a user