about summary refs log tree commit diff
path: root/nixos/modules/system/boot/initrd-network.nix
diff options
context:
space:
mode:
authorvolth <volth@webmaster.ms>2018-09-10 02:39:15 +0000
committerGitHub <noreply@github.com>2018-09-10 02:39:15 +0000
commit16edfb22b814bf689a112de978bae97c334dd5e0 (patch)
treebc030f84ee6a11e6d83c9fbcf3e8d9d16eaf3dc2 /nixos/modules/system/boot/initrd-network.nix
parent502b37ae6391e52b3a319c4ebf49e3358c50a440 (diff)
oops
Diffstat (limited to 'nixos/modules/system/boot/initrd-network.nix')
-rw-r--r--nixos/modules/system/boot/initrd-network.nix5
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" \