Author: chaoflow Date: Wed Dec 28 21:46:50 2011 New Revision: 31132 URL: https://nixos.org/websvn/nix/?rev=31132&sc=1
Log: test we have cryptsetup-1.4.1 in initrd Modified: nixos/trunk/modules/system/boot/luksroot.nix Modified: nixos/trunk/modules/system/boot/luksroot.nix ============================================================================== --- nixos/trunk/modules/system/boot/luksroot.nix Wed Dec 28 21:46:48 2011 (r31131) +++ nixos/trunk/modules/system/boot/luksroot.nix Wed Dec 28 21:46:50 2011 (r31132) @@ -38,8 +38,19 @@ done ''; + # test whether cryptsetup finds all dependencies and is at least + # version 1.4.1 boot.initrd.extraUtilsCommandsTest = '' - $out/bin/cryptsetup --version + cryptsetup_version=$($out/bin/cryptsetup --version |cut -d' ' -f2) + if test $(echo $version |cut -d'.' -f1) -lt 1; then + if test $(echo $version |cut -d'.' -f2) -lt 4; then + if test $(echo $version |cut -d'.' -f3) -lt 2; then + echo "Somehow the version of cryptsetup is too old: $cryptsetup_version instead of 1.4.1" + exit 1 + fi + fi + fi + unset cryptsetup_version ''; boot.initrd.preLVMCommands = '' _______________________________________________ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits