FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 04-14-2011, 05:24 PM
Chris Lumens
 
Default Fix unmounting in anaconda-cleanup to deal with /mnt/sysimage as well.

---
scripts/anaconda-cleanup | 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 7e7d175..4af96c5 100755
--- a/scripts/anaconda-cleanup
+++ b/scripts/anaconda-cleanup
@@ -1,14 +1,15 @@
#!/usr/bin/python
"""
- image install:
-
+ always:
- unmount everything under /mnt/sysimage
- unmount everything under /mnt/install
+
+ image install:
+
- populate a devicetree with only the image "disks"

live install:

- - unmount everything under /mnt/sysimage
- unmount everything under /media
- populate a devicetree and tear everything down

@@ -70,25 +71,15 @@ for mounted in reversed(open("/proc/mounts").readlines()):
if mountpoint.startswith("/mnt/anactest"):
continue

- # If this is for an image install, only unmount all filesystems under
- # /mnt/sysimage and /mnt/install.
- if image_install and not (mountpoint.startswith("/mnt/sysimage") or
- mountpoint.startswith("/mnt/install")):
- continue
+ # Always clean up anaconda's mountpoints.
+ if mountpoint.startswith("/mnt/sysimage") or mountpoint.startswith("/mnt/install"):
+ os.system("umount %s" % mountpoint)

# If this is for a live install, unmount any non-nodev filesystem that
# isn't related to the live image.
- if (not mountpoint.startswith("/media") and
- not device.startswith("/dev") or
- "live" in mounted):
- continue
-
- # If this is neither, just unmount everything under /mnt/install.
- if not image_install and not live_install and
- not mountpoint.startswith("/mnt/install"):
- continue
-
- os.system("umount %s" % mountpoint)
+ if (mountpoint.startswith("/media") or device.startswith("/dev")) and
+ not "live" in mounted:
+ os.system("umount %s" % mountpoint)

os.system("udevadm control --env=ANACONDA=1")
os.system("udevadm trigger --subsystem-match block")
--
1.7.4.1

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

Thread Tools




All times are GMT. The time now is 07:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org