[PATCH 3/6] Check for live when umounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also don't traceback on devices where the lookup fails,
print their name instead and continue.
---
 scripts/anaconda-cleanup |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 4af96c5..9375458 100755
--- a/scripts/anaconda-cleanup
+++ b/scripts/anaconda-cleanup
@@ -78,7 +78,7 @@ for mounted in reversed(open("/proc/mounts").readlines()):
     # If this is for a live install, unmount any non-nodev filesystem that
     # isn't related to the live image.
     if (mountpoint.startswith("/media") or device.startswith("/dev")) and \
-       not "live" in mounted:
+       live_install and not "live" in mounted:
         os.system("umount %s" % mountpoint)
 
 os.system("udevadm control --env=ANACONDA=1")
@@ -89,6 +89,9 @@ devicetree.populate(cleanupOnly=True)
 devicetree.teardownAll()
 for name in devicetree.diskImages.keys():
     device = devicetree.getDeviceByName(name)
-    device.deactivate(recursive=True)
+    if device:
+        device.deactivate(recursive=True)
+    else:
+        print "No device found for (%s)" % (name,)
 os.system("udevadm control --env=ANACONDA=0")
 
-- 
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux