diff options
Diffstat (limited to 'nixos/modules/system/boot/initrd-network.nix')
-rw-r--r-- | nixos/modules/system/boot/initrd-network.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/initrd-network.nix b/nixos/modules/system/boot/initrd-network.nix index 1019b8db6daba..720a9ffd53d6c 100644 --- a/nixos/modules/system/boot/initrd-network.nix +++ b/nixos/modules/system/boot/initrd-network.nix @@ -12,10 +12,9 @@ let '' #! /bin/sh if [ "$1" = bound ]; then + ip address add "$ip/$mask" dev "$interface" if [ -n "$mtu" ]; then - ip address add "$ip/$mask" dev "$interface" mtu "$mtu" - else - ip address add "$ip/$mask" dev "$interface" + ip link set mtu "$mtu" dev "$interface" fi if [ -n "$staticroutes" ]; then echo "$staticroutes" \ |