forked from mirrors/nixpkgs
nixos/network-interfaces: More fixes
This commit is contained in:
parent
fbe9ac05d3
commit
299b59d1c4
|
@ -197,10 +197,6 @@ in
|
||||||
echo "Adding bridge ${n}..."
|
echo "Adding bridge ${n}..."
|
||||||
ip link add name "${n}" type bridge
|
ip link add name "${n}" type bridge
|
||||||
|
|
||||||
# Set bridge's hello time to 0 to avoid startup delays.
|
|
||||||
echo 0 >"/sys/class/net/${n}/bridge/hello_time"
|
|
||||||
echo 0 >"/sys/class/net/${n}/bridge/forward_delay"
|
|
||||||
|
|
||||||
# Enslave child interfaces
|
# Enslave child interfaces
|
||||||
${flip concatMapStrings v.interfaces (i: ''
|
${flip concatMapStrings v.interfaces (i: ''
|
||||||
ip link set "${i}" master "${n}"
|
ip link set "${i}" master "${n}"
|
||||||
|
@ -226,7 +222,7 @@ in
|
||||||
before = [ "${n}-cfg.service" ];
|
before = [ "${n}-cfg.service" ];
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.RemainAfterExit = true;
|
serviceConfig.RemainAfterExit = true;
|
||||||
path = [ pkgs.iproute ];
|
path = [ pkgs.iproute pkgs.gawk ];
|
||||||
script = ''
|
script = ''
|
||||||
echo "Destroying old bond ${n}..."
|
echo "Destroying old bond ${n}..."
|
||||||
${destroyBond n}
|
${destroyBond n}
|
||||||
|
|
|
@ -678,6 +678,7 @@ in
|
||||||
before = [ "network-interfaces.target" ];
|
before = [ "network-interfaces.target" ];
|
||||||
bindsTo = [ (subsystemDevice i.name) ];
|
bindsTo = [ (subsystemDevice i.name) ];
|
||||||
after = [ (subsystemDevice i.name) ];
|
after = [ (subsystemDevice i.name) ];
|
||||||
|
path = [ pkgs.iproute ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
|
Loading…
Reference in a new issue