Fix an infinite loop in grub-mkconfig

* util/grub.d/10_hurd.in: Make kernel list progression not fail on
kernels whose paths contain regex metacharacters.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

Reported by: Heimo Stranner.
This commit is contained in:
Colin Watson 2014-07-08 23:54:30 +01:00
parent 4250f552a6
commit 0901e7855f
5 changed files with 15 additions and 5 deletions

View file

@ -241,7 +241,7 @@ while [ "x$list" != "x" ] ; do
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
done
# If at least one kernel was found, then we need to