diff options
Diffstat (limited to '')
-rw-r--r-- | source/a/elilo/eliloconfig | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/a/elilo/eliloconfig b/source/a/elilo/eliloconfig index 9d7475f9a..ae622634f 100644 --- a/source/a/elilo/eliloconfig +++ b/source/a/elilo/eliloconfig @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2013, 2016, 2017 Patrick Volkerding, Sebeka, Minnesota, USA +# Copyright 2013, 2016, 2017, 2023 Patrick Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -176,12 +176,19 @@ if [ "$REPLY" = "skip" ]; then exit fi -if [ ! -d /sys/firmware/efi/vars ]; then - modprobe efivars 1> /dev/null 2> /dev/null +# Make sure an interface to read/write EFI variables is present: +if [ ! -d /sys/firmware/efi/efivars ]; then + modprobe efivarfs 1> /dev/null 2> /dev/null sleep 1 # Probably not needed, but playing it safe + # Take another look: + if [ ! -d /sys/firmware/efi/efivars ]; then + # Maybe we have an old kernel, so try the previous /sys/firmware/efi/vars interface instead: + modprobe efivars 1> /dev/null 2> /dev/null + sleep 1 # Probably not needed, but playing it safe + fi fi -# If it's still gone, we fail silently: -if [ ! -d /sys/firmware/efi/vars ]; then +# At this point, we fail silently if we don't have either of these directories: +if [ ! -d /sys/firmware/efi/efivars -a ! -d /sys/firmware/efi/vars ]; then exit fi |