summaryrefslogtreecommitdiff
path: root/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch')
-rw-r--r--sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch
new file mode 100644
index 000000000000..a9859f5005ab
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch
@@ -0,0 +1,21 @@
+Fixes errors like "umount: /var/lib/os-prober/mount: target is busy."
+which can appear in some corner-cases.
+
+Bug: https://bugzilla.redhat.com/903906
+
+--- a/common.sh
++++ b/common.sh
+@@ -336,3 +336,13 @@ linux_mount_boot () {
+
+ mountboot="$bootpart $mounted"
+ }
++
++umount_exec=$(which umount)
++umount() {
++ if ! $umount_exec $@ 2> /dev/null; then
++ error "umount error, retrying after 1 sec"
++ sleep 1
++ $umount_exec $@
++ fi
++}
++