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 > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-13-2011, 03:48 PM
Chris Lumens
 
Default Unmount everything in /mnt/install from anaconda-cleanup.

---
scripts/anaconda-cleanup | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 528b530..0f4df15 100755
--- a/scripts/anaconda-cleanup
+++ b/scripts/anaconda-cleanup
@@ -3,6 +3,7 @@
image install:

- unmount everything under /mnt/sysimage
+ - unmount everything under /mnt/install
- populate a devicetree with only the image "disks"

live install:
@@ -63,10 +64,6 @@ for dev in os.listdir(sys_class_block):
if not image_install:
live_install = live_install or os.path.exists("/dev/live")

-if not image_install and not live_install:
- print >> sys.stderr, "not a live install or an image install -- exiting"
- sys.exit(1)
-
# unmount filesystems
for mounted in reversed(open("/proc/mounts").readlines()):
(device, mountpoint, rest) = mounted.split(" ", 2)
@@ -74,8 +71,9 @@ for mounted in reversed(open("/proc/mounts").readlines()):
continue

# If this is for an image install, only unmount all filesystems under
- # /mnt/sysimage
- if image_install and not mountpoint.startswith("/mnt/sysimage"):
+ # /mnt/sysimage and /mnt/install.
+ if image_install and not mountpoint.startswith("/mnt/sysimage") and
+ not mountpoint.startswith("/mnt/install"):
continue

# If this is for a live install, unmount any non-nodev filesystem that
@@ -85,6 +83,11 @@ for mounted in reversed(open("/proc/mounts").readlines()):
"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)

os.system("udevadm control --env=ANACONDA=1")
--
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 12:59 AM.

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