Created
September 17, 2019 20:24
-
-
Save arianvp/6e5468f8487e54b68d4f82175902b959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[arian@t490s:~/Projects/nixos/nixpkgs]$ git diff nixos/modules/system/boot/initrd-network.nix | |
diff --git a/nixos/modules/system/boot/initrd-network.nix b/nixos/modules/system/boot/initrd-network.nix | |
index cb8fc957a99..d7de85b00df 100644 | |
--- a/nixos/modules/system/boot/initrd-network.nix | |
+++ b/nixos/modules/system/boot/initrd-network.nix | |
@@ -130,6 +130,15 @@ in | |
if [ -n "$hasNetwork" ]; then | |
echo "networking is up!" | |
${cfg.postCommands} | |
+ # And bring all interfaces down Reason is that we don't do interface | |
+ # renaming in stage-1 (yet), But having the un-renamed interfaces "in | |
+ # use" when switching to stage-2 causes the rename to fail | |
+ for iface in $(ls /sys/class/net/); do | |
+ echo "bringing up network interface $iface..." | |
+ ip link set "$iface" down | |
+ done | |
+ | |
+ | |
fi | |
''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment