vlans and mt300a wired network interfaces
This commit is contained in:
parent
06687a819a
commit
e86e9430fc
2 changed files with 28 additions and 1 deletions
|
@ -8,11 +8,13 @@ let
|
|||
inherit (liminix.services) oneshot longrun;
|
||||
inherit (lib) concatStringsSep optional;
|
||||
in {
|
||||
interface = { type ? "hardware", device, primary ? null, dependencies ? [] } @ args:
|
||||
interface = { type ? "hardware", device, link ? null, primary ? null, id ? null, dependencies ? [] } @ args:
|
||||
let ups =
|
||||
[]
|
||||
++ optional (type == "bridge")
|
||||
"ip link add name ${device} type bridge"
|
||||
++ optional (type == "vlan")
|
||||
"ip link add link ${link} name ${device} type vlan id ${id}"
|
||||
++ ["${ifwait}/bin/ifwait -v ${device} present"]
|
||||
++ ["ip link set up dev ${device}"]
|
||||
++ optional (primary != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue