Skip to contentSkip to conversation

[2.02] 10_linux: Fix grouping of tests for GRUB_DEVICE

PATCH Applied Mike Gilbert 2 participants 2 messages Mar 5, 2016 – Mar 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [2.02] 10_linux: Fix grouping of tests for GRUB_DEVICE

Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to mixing of || and && operators. Add some parens to help with that.

---
 util/grub.d/10_linux.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util/grub.d/10_linux.in +1 -1
index 5a78513..de9044c 100644
@@ -47,7 +47,7 @@ esac
 # and mounting btrfs requires user space scanning, so force UUID in this case.
 if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
     || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
-    || test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm; then
+    || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
 else
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
Signature · 1 line
2.7.2
#1 lore raw

06.03.2016 01:30, Mike Gilbert пишет:

Quoted 2 lines

Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to mixing of || and && operators. Add some parens to help with that.

Applied. Thanks!

Quoted 18 lines
---
 util/grub.d/10_linux.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util/grub.d/10_linux.in +1 -1
index 5a78513..de9044c 100644
@@ -47,7 +47,7 @@ esac
 # and mounting btrfs requires user space scanning, so force UUID in this case.
 if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
     || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
-    || test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm; then
+    || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
 else
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}