From 7a7d04af8aa5041eb6c28a4573342b5fbdb7497f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Aug 2012 17:09:44 -0400 Subject: [PATCH] systemd: Use the kernel modules from /run/booted-system This prevents failures in systemd-modules-load.service like "Failed to lookup alias 'ipv6': Function not implemented". --- modules/system/boot/modprobe.nix | 8 ++++---- modules/system/boot/stage-2-init.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/system/boot/modprobe.nix b/modules/system/boot/modprobe.nix index 03d9222af21..141be71b920 100644 --- a/modules/system/boot/modprobe.nix +++ b/modules/system/boot/modprobe.nix @@ -17,8 +17,8 @@ with pkgs.lib; text = '' #! ${pkgs.stdenv.shell} - export MODULE_DIR=/var/run/current-system/kernel-modules/lib/modules - + export MODULE_DIR=/run/current-system/kernel-modules/lib/modules + # Fall back to the kernel modules used at boot time if the # modules in the current configuration don't match the # running kernel. @@ -105,8 +105,8 @@ with pkgs.lib; environment.shellInit = '' - export MODULE_DIR=/var/run/current-system/kernel-modules/lib/modules - ''; + export MODULE_DIR=/run/current-system/kernel-modules/lib/modules + ''; }; diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 80aff11b34b..fd60fa5e59e 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -178,5 +178,5 @@ fi # Start systemd. echo "starting systemd..." PATH=/run/current-system/systemd/lib/systemd \ - MODULE_DIR=/run/current-system/kernel-modules/lib/modules \ + MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \ exec systemd --log-target=journal # --log-level=debug --log-target=console --crash-shell