From 137ce0907c59ee2541850e6a87f7eb3bfed6c2d0 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 31 Jul 2009 08:32:53 +0000 Subject: [PATCH] Some fixes in on-boot activation svn path=/nixos/branches/modular-nixos/; revision=16525 --- modules/system/activation/activation-script.nix | 6 ++++-- modules/system/etc/etc.nix | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/system/activation/activation-script.nix b/modules/system/activation/activation-script.nix index 64dc5d6b936..7053166d582 100644 --- a/modules/system/activation/activation-script.nix +++ b/modules/system/activation/activation-script.nix @@ -61,9 +61,11 @@ let # Allow the kernel to find our wrapped modprobe (which searches in the # right location in the Nix store for kernel modules). We need this # when the kernel (or some module) auto-loads a module. - # !!! maybe this should only happen at boot time, since we shouldn't + # this should only happen at boot time, since we shouldn't # use modules that don't match the running kernel. - echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe + if [ "$(cat /proc/sys/kernel/modprobe)" = "/sbin/modprobe" ]; then + echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe + fi '' [ # ? ]; diff --git a/modules/system/etc/etc.nix b/modules/system/etc/etc.nix index c499cc0583a..83da614bf74 100644 --- a/modules/system/etc/etc.nix +++ b/modules/system/etc/etc.nix @@ -54,6 +54,7 @@ in activationScripts = { etc = pkgs.lib.fullDepEntry '' # Set up the statically computed bits of /etc. + echo -n "Setting up /etc files .. " staticEtc=/etc/static rm -f $staticEtc ln -s ${makeEtc}/etc $staticEtc @@ -70,6 +71,7 @@ in ln -s $staticEtc/$i /etc/$i fi done + echo ".. done" # Remove dangling symlinks that point to /etc/static. These are # configuration files that existed in a previous configuration but not