replace waitup with more generally useful ifwait

* wait for $interface present before ip link set up dev
* wait for wlan0 running before adding to bridge
This commit is contained in:
Daniel Barlow
2023-03-01 17:55:52 +00:00
parent 14dacb8056
commit 626a365f79
7 changed files with 75 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
{
callPackage
, liminix
, ifwait
, lib
}:
let
@@ -12,6 +13,7 @@ in {
[]
++ optional (type == "bridge")
"ip link add name ${device} type bridge"
++ ["${ifwait}/bin/ifwait -v ${device} present"]
++ ["ip link set up dev ${device}"]
++ optional (primary != null)
"ip link set dev ${device} master ${primary.device}";