chroot_sysfs: umount efivarfs if mounted

Trying to umount /sys currently fails if efivarfs is mounted under it. Umount
it first.

Bug: #1053457
This commit is contained in:
Emanuele Rocca 2023-11-06 17:31:13 +01:00
parent 4832b6215d
commit 75d43b3394
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ case "${_ACTION}" in
# Acquire lock file
Acquire_lockfile
# Unmounting /sys/firmware/efi/efivars
if mountpoint -q chroot/sys/firmware/efi/efivars
then
umount chroot/sys/firmware/efi/efivars
fi
# Unmounting /sys
if [ -e chroot/sys/class ]
then