]> TLD Linux GIT Repositories - rc-scripts.git/commitdiff
- mount efivars when running under EFI firmware
authorMarcin Krol <hawk@tld-linux.org>
Tue, 21 May 2024 16:25:51 +0000 (18:25 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 21 May 2024 16:25:51 +0000 (18:25 +0200)
rc.d/rc.sysinit

index 826b4353e72ef385691a6bbb916aee4906069e08..e84b24761475aa18fa39b9f563693e38d4e434f9 100755 (executable)
@@ -383,7 +383,10 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
                grep -Fq sysfs /proc/filesystems && mount -n -o gid=17 -t sysfs sysfs /sys
        fi
        if grep -Fq securityfs /proc/filesystems; then
-               mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security
+               mount -n -t securityfs securityfs /sys/kernel/security
+       fi
+       if [ -d /sys/firmware/efi ] && ! is_fsmounted efivarfs /sys/firmware/efi/efivars; then
+               mount -n -o rw -t efivarfs efivarfs /sys/firmware/efi/efivars
        fi
 
        init_selinux
@@ -655,6 +658,9 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
                if is_fsmounted securityfs /sys/kernel/security ; then
                        mount -f -t securityfs securityfs /sys/kernel/security 2> /dev/null
                fi
+               if [ -d /sys/firmware/efi ] && is_fsmounted efivarfs /sys/firmware/efi/efivars ; then
+                       mount -f -t efivarfs efivarfs /sys/firmware/efi/efivars 2> /dev/null
+               fi
        fi
 
        if is_fsmounted selinuxfs /selinux; then