* util/grub.d/30_os-prober.in: Add GRUB_OS_PROBER_SKIP_LIST to

selectively skipping systems.
This commit is contained in:
Axel Kellermann 2013-11-19 23:39:51 +01:00 committed by Vladimir Serbinenko
parent 4e7d433dfb
commit 55e706c918
4 changed files with 23 additions and 1 deletions

View file

@ -112,6 +112,18 @@ for OS in ${OSPROBED} ; do
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
BOOT="`echo ${OS} | cut -d ':' -f 4`"
UUID="`grub-probe --target=fs_uuid --device ${DEVICE%@*}`"
EXPUUID="$UUID"
if [ x"${DEVICE#*@}" != x ] ; then
EXPUUID="${EXPUUID}@${DEVICE#*@}"
fi
if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" -a "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
continue
fi
BTRFS="`echo ${OS} | cut -d ':' -f 5`"
if [ "x$BTRFS" = "xbtrfs" ]; then
BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`"
@ -265,7 +277,7 @@ EOF
echo "$title_correction_code"
;;
macosx)
OSXUUID="`${grub_probe} --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
OSXUUID="${UUID}"
osx_entry xnu_kernel 32
osx_entry xnu_kernel64 64
;;