50mounted-tests: trap do_unmount function on errors
Resolves: RHEL-56629 Signed-off-by: Leo Sandoval <lsandova@lsandova-thinkpadp1gen5.rmtmx.csb>
This commit is contained in:
parent
4951dd026d
commit
ce1b711818
27
os-prober-trap_unmount.patch
Normal file
27
os-prober-trap_unmount.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Leo Sandoval <lsandova@redhat.com>
|
||||
Date: Thu, 13 Jun 2024 17:05:44 -0600
|
||||
Subject: [PATCH] 50mounted-tests: trap do_unmount function on errors
|
||||
|
||||
Traps the do_unmount function on error, unmounting any previous
|
||||
partition in case of error and not letting the partition to be included
|
||||
as boot entry when called on behalf of grub2-mkconfig.
|
||||
|
||||
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
|
||||
---
|
||||
linux-boot-probes/common/50mounted-tests | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/linux-boot-probes/common/50mounted-tests b/linux-boot-probes/common/50mounted-tests
|
||||
index ad68874..63b2174 100755
|
||||
--- a/linux-boot-probes/common/50mounted-tests
|
||||
+++ b/linux-boot-probes/common/50mounted-tests
|
||||
@@ -13,6 +13,8 @@ do_unmount() {
|
||||
rmdir "$tmpmnt" || true
|
||||
}
|
||||
|
||||
+trap do_unmount ERR
|
||||
+
|
||||
partition="$1"
|
||||
|
||||
types="$(fs_type "$partition")"
|
@ -22,6 +22,7 @@ Patch8: os-prober-grub2-parsefix.patch
|
||||
Patch9: os-prober-grepfix.patch
|
||||
Patch10: os-prober-grub2-mount-workaround.patch
|
||||
Patch11: os-prober-arm64-win11.patch
|
||||
Patch13: os-prober-trap_unmount.patch
|
||||
|
||||
Requires: udev coreutils util-linux
|
||||
Requires: grep /bin/sed /sbin/modprobe
|
||||
@ -91,6 +92,10 @@ fi
|
||||
%{_var}/lib/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Sep 9 2024 Leo Sandoval <lsandova@redhat.com> - 1.81-8
|
||||
- 50mounted-tests: trap do_unmount function on errors
|
||||
- Resolves: RHEL-56629
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.81-7
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user