Author: chaoflow Date: Wed Dec 28 21:46:45 2011 New Revision: 31130 URL: https://nixos.org/websvn/nix/?rev=31130&sc=1
Log: add preLVMCommands hook Modified: nixos/trunk/modules/system/boot/stage-1-init.sh nixos/trunk/modules/system/boot/stage-1.nix Modified: nixos/trunk/modules/system/boot/stage-1-init.sh ============================================================================== --- nixos/trunk/modules/system/boot/stage-1-init.sh Wed Dec 28 21:46:42 2011 (r31129) +++ nixos/trunk/modules/system/boot/stage-1-init.sh Wed Dec 28 21:46:45 2011 (r31130) @@ -123,6 +123,11 @@ udevadm settle udevadm control --env=STARTUP= + +# XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered +@preLVMCommands@ + + echo "starting device mapper and LVM..." lvm vgscan lvm vgchange -ay Modified: nixos/trunk/modules/system/boot/stage-1.nix ============================================================================== --- nixos/trunk/modules/system/boot/stage-1.nix Wed Dec 28 21:46:42 2011 (r31129) +++ nixos/trunk/modules/system/boot/stage-1.nix Wed Dec 28 21:46:45 2011 (r31130) @@ -35,6 +35,14 @@ ''; }; + boot.initrd.preLVMCommands = mkOption { + default = ""; + merge = mergeStringOption; + description = '' + Shell commands to be executed immediately before lvm discovery. + ''; + }; + boot.initrd.postDeviceCommands = mkOption { default = ""; merge = mergeStringOption; @@ -304,7 +312,7 @@ inherit (config.boot) resumeDevice devSize runSize; inherit (config.boot.initrd) checkJournalingFS - postDeviceCommands postMountCommands kernelModules; + preLVMCommands postDeviceCommands postMountCommands kernelModules; # !!! copy&pasted from upstart-jobs/filesystems.nix. mountPoints = _______________________________________________ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits