os-prober/SOURCES/os-prober-umount-fix.patch

19 lines
400 B
Diff
Raw Permalink Normal View History

2021-11-04 01:37:28 +00:00
Index: os-prober/common.sh
===================================================================
--- os-prober.orig/common.sh
+++ os-prober/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
+}
+