From e08e7aedbc7dd18620a4d29b9b120842cce65b93 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 18 Jun 2009 16:03:18 +0000 Subject: [PATCH] * Option boot.initrd.postMountCommands to specify additional shell commands for in stage 1 of the boot. svn path=/nixos/branches/modular-nixos/; revision=15998 --- modules/system/boot/stage-1-init.sh | 3 +++ modules/system/boot/stage-1.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index dd1fe0c886f..17c9d2b3ee0 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -266,6 +266,9 @@ if test -n "@isLiveCD@"; then fi +@postMountCommands@ + + # Stop udevd. kill $(minips -C udevd -o pid=) diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 565af8fdc8f..da8a50f4903 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -62,6 +62,15 @@ let ''; }; + boot.initrd.postMountCommands = mkOption { + default = ""; + merge = pkgs.lib.mergeStringOption; + description = '' + Shell commands to be executed immediately after the stage 1 + filesystems has been mounted. + ''; + }; + fileSystems = mkOption { options.neededForBoot = mkOption { default = false; @@ -223,7 +232,7 @@ let inherit (config.boot) isLiveCD resumeDevice; - inherit (config.boot.initrd) checkJournalingFS; + inherit (config.boot.initrd) checkJournalingFS postMountCommands; # !!! copy&pasted from upstart-jobs/filesystems.nix. mountPoints =