Blame SOURCES/0019-RHEL-7-daemon-umount-all-Hack-to-avoid-umount-sysroo.patch

e76f14
From 7e25abeffd2c7a68a06fa72fff274377637453ab Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Thu, 23 Jul 2015 18:15:36 -0400
ffd6ed
Subject: [PATCH] RHEL 7: daemon: umount-all: Hack to avoid umount: /sysroot:
ffd6ed
 target is busy (RHBZ#1246032).
ffd6ed
ffd6ed
This bug is not properly understood (although readily reproducible).
ffd6ed
However this hack makes it go away for now.
ffd6ed
ffd6ed
https://bugzilla.redhat.com/show_bug.cgi?id=1246032
ffd6ed
---
ffd6ed
 daemon/mount.c | 5 +++++
ffd6ed
 1 file changed, 5 insertions(+)
ffd6ed
ffd6ed
diff --git a/daemon/mount.c b/daemon/mount.c
e76f14
index 869c9b8..7903bc2 100644
ffd6ed
--- a/daemon/mount.c
ffd6ed
+++ b/daemon/mount.c
ffd6ed
@@ -26,6 +26,8 @@
ffd6ed
 #include <sys/types.h>
ffd6ed
 #include <mntent.h>
ffd6ed
 
ffd6ed
+#include "ignore-value.h"
ffd6ed
+
ffd6ed
 #include "daemon.h"
ffd6ed
 #include "actions.h"
ffd6ed
 
e76f14
@@ -414,6 +416,9 @@ do_umount_all (void)
ffd6ed
   if (mounts.size > 0)
ffd6ed
     qsort (mounts.argv, mounts.size, sizeof (char *), compare_longest_first);
ffd6ed
 
ffd6ed
+  /* Hack to work around RHBZ#1246032. */
ffd6ed
+  ignore_value (system ("lsof /sysroot"));
ffd6ed
+
ffd6ed
   /* Unmount them. */
ffd6ed
   for (i = 0; i < mounts.size; ++i) {
ffd6ed
     CLEANUP_FREE char *err = NULL;
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed