Merge pull request #161391 from mweinelt/systemd-modprobe

modprobe: install systemd's modprobe options
This commit is contained in:
0x4A6F 2022-02-22 21:09:09 +01:00 committed by GitHub
commit 40312e317c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -72,6 +72,8 @@ with lib;
'';
environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
environment.etc."modprobe.d/systemd.conf".source = "${pkgs.systemd}/lib/modprobe.d/systemd.conf";
environment.systemPackages = [ pkgs.kmod ];
system.activationScripts.modprobe = stringAfter ["specialfs"]

View file

@ -246,13 +246,13 @@ let
networking = {
useNetworkd = networkd;
useDHCP = false;
bonds.bond = {
bonds.bond0 = {
interfaces = [ "eth1" "eth2" ];
driverOptions.mode = "balance-rr";
driverOptions.mode = "802.3ad";
};
interfaces.eth1.ipv4.addresses = mkOverride 0 [ ];
interfaces.eth2.ipv4.addresses = mkOverride 0 [ ];
interfaces.bond.ipv4.addresses = mkOverride 0
interfaces.bond0.ipv4.addresses = mkOverride 0
[ { inherit address; prefixLength = 30; } ];
};
};
@ -274,6 +274,10 @@ let
client2.wait_until_succeeds("ping -c 2 192.168.1.1")
client2.wait_until_succeeds("ping -c 2 192.168.1.2")
with subtest("Verify bonding mode"):
for client in client1, client2:
client.succeed('grep -q "Bonding Mode: IEEE 802.3ad Dynamic link aggregation" /proc/net/bonding/bond0')
'';
};
bridge = let