test we have cryptsetup-1.4.1 in initrd

svn path=/nixos/trunk/; revision=31132
This commit is contained in:
Florian Friesdorf 2011-12-28 21:46:50 +00:00
parent c15aa7aea3
commit c7fd05a650

View file

@ -38,8 +38,19 @@ in
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 = ''