New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 310_include_uefi_tools.sh #1477
Conversation
Related issue: #1478 |
@@ -8,7 +8,9 @@ if [[ ! -d /boot/[eE][fF][iI] ]]; then | |||
if is_true $USING_UEFI_BOOTLOADER; then | |||
Error "USING_UEFI_BOOTLOADER = 1 but there is no directory at /boot/efi or /boot/EFI" # abort | |||
fi | |||
return # skip | |||
if ! grep -q '/boot/efi' /proc/mounts; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that using mountpoint -q /boot/efi
is more elegant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or rather mountpoint -q /boot/[Ee][Ff][Ii]
as we want to be case-insensitive.
I'd say that whole condition
is somehow "off topic". Is there benefit from such check? V. |
Hmm, OK maybe not fully "off topic", but maybe we could simplify it bit. Something like
V. |
@@ -8,7 +8,9 @@ if [[ ! -d /boot/[eE][fF][iI] ]]; then | |||
if is_true $USING_UEFI_BOOTLOADER; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the whole block is executed when the directory does not exist, what is the point of checking whether it is a mount point?
Shouldn't it be rather
if [[ ! -d /boot/[eE][fF][iI] || ! mountpoint -q /boot/[eE][fF][iI] ]]; then
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pcahyna , correct . I have edited the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this is not correct either, i will provide a better fix later today.
I can reproduce the problem with rear-2.00, but not with the git master branch (revision 0828079). I suspect this fix does not apply to master anymore. |
I have tested the current master branch on Ubuntu 16.04.3 LTS. On my UEFI boot system, 1. The test in line 7 of
|
Thanks for the testing with EFI. When I wrote
I was speaking about the problem of rear not working on systems without EFI, and no statement about systems with EFI was intended.
Indeed, see my recent comment jsmeix@9bb0735#commitcomment-24177948 on 9bb0735 (which introduced this problem).
I also wondered why the variable is being set in 320_xxx and being used in 310_xxx . |
With @gozora |
@jsmeix
|
@OliverO2 |
@jsmeix OK. As I only have a limited amount of time available, I'll wait with testing until both known problems are addressed. I could also provide a PR with a complete UEFI-tested fix if that's what you'd prefer. |
@pcahyna @OliverO2 |
@jsmeix I see. My point was that before your commit the master branch did not suffer from issue #1478 anymore and so this pull request was actually not needed. See #1477 (comment) (Arguably, this was purely coincidental and #1478 had not been fixed properly.) Anyway, we now need again to fix it. |
I close this pull request because it is |
This change should resolve issue of rear terminating if /boot/efi directory is not mounted