'As GRUB limit on x86 is probably 191 entries, make sure we don't get more than 190 (one for safety)'

svn path=/nixos/trunk/; revision=10110
This commit is contained in:
Michael Raskin 2008-01-10 12:28:01 +00:00
parent ad2ecc2cb5
commit 8eeb6a0a91

View file

@ -35,7 +35,15 @@ if test -n "@grubSplashImage@"; then
echo "splashimage $splashLocation" >> $tmp
fi
configurationCounter=0;
configurationCounter=0
configurationLimit="@configurationLimit@"
numAlienEntries=$(cat <<EOF | egrep '^[[:space:]]*title' | wc -l
@extraGrubEntries@
EOF)
if test $((configurationLimit+numAlienEntries)) -gt 190; then
configurationLimit=$((190-numAlienEntries));
fi
addEntry() {
local name="$1"