On Fri, Jul 23, 2010 at 19:50:56 -0700,
Jasper Hartline <jasper.hartline(a)gmail.com> wrote:
Attached is a patch that will fix BZ# 509427 involving
livecd-creator
crashing hard
when it is unable to mount filesystems immediately during an exception.
diff -up patch/fs.py.orig patch/fs.py
--- patch/fs.py.orig 2010-07-23 18:17:34.000000000 -0700
+++ patch/fs.py 2010-07-23 18:18:54.000000000 -0700
@@ -112,7 +112,7 @@ class BindChrootMount:
if not self.mounted:
return
- rc = subprocess.call(["/bin/umount", self.dest])
+ rc = subprocess.call(["/bin/umount", "-l", self.dest])
if rc != 0:
raise MountError("Unable to unmount filesystem at %s" %
self.dest)
self.mounted = False
Does anyone see any problems with also using -l on the file system umounts?
While those aren't currently a problem, I think we want the same safety
there, so that mounts don't get left hanging.
So that the patch would now look like:
--- fs.py.orig 2010-07-24 08:07:37.000000000 -0500
+++ fs.py 2010-07-24 08:08:13.000000000 -0500
@@ -112,7 +112,7 @@
if not self.mounted:
return
- rc = subprocess.call(["/bin/umount", self.dest])
+ rc = subprocess.call(["/bin/umount", "-l", self.dest])
if rc != 0:
raise MountError("Unable to unmount filesystem at %s" % self.dest)
self.mounted = False
@@ -353,7 +353,7 @@
def unmount(self):
if self.mounted:
logging.debug("Unmounting directory %s" % self.mountdir)
- rc = subprocess.call(["/bin/umount", self.mountdir])
+ rc = subprocess.call(["/bin/umount", "-l",
self.mountdir])
if rc == 0:
self.mounted = False
else: