Skip to content
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

Simplify awk constructs in 320_include_uefi_env.sh (issue #2095) #2115

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Apr 11, 2019

Seems to work well for me on openSUSE Leap 15.0

# usr/sbin/rear -D mkrescue
...
Found EFI system partition /dev/sda1 on /boot/efi type vfat
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
  • Brief description of the changes in this pull request:

The - from my point of view - needlessly overcomplicated
local variables (sometimes uppercased) and their awk constructs
are simplified into using plain grep and a bash array
to avoid inexplicable wrong behaviour in some cases
that is somehow related to the nullglob bash option, cf.
#2095 (comment)
together with different kind of awk, cf.
#2095 (comment)

Additionally there is better user info in debug mode via DebugPrint
(in particular when things do not work as usually expected).

@jsmeix jsmeix added the bug The code does not do what it is meant to do label Apr 11, 2019
@jsmeix jsmeix added this to the ReaR v2.5 milestone Apr 11, 2019
@jsmeix jsmeix requested a review from gozora April 11, 2019 11:07
@jsmeix jsmeix self-assigned this Apr 11, 2019
@jsmeix jsmeix added the cleanup label Apr 11, 2019
Copy link
Member

@gozora gozora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Thanks for picking this up!

V.

# First try /boot/efi:
esp_proc_mounts_line=( $( grep ' /boot/efi ' /proc/mounts || echo false ) )
if is_false $esp_proc_mounts_line ; then
# If nothing is mounted on on /boot/efi try /boot:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...on on...

@jsmeix jsmeix merged commit 3f5e5e4 into rear:master Apr 11, 2019
@jsmeix jsmeix deleted the simplify_awk_constructs_in_320_include_uefi_env_sh_issue2095 branch April 11, 2019 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do cleanup fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants