diff options
| author | Chris Lumens <clumens@redhat.com> | 2011-04-12 16:02:07 -0400 |
|---|---|---|
| committer | Chris Lumens <clumens@redhat.com> | 2011-04-13 13:56:35 -0400 |
| commit | 52a586a5fb47f463bdc91021791bf74ee050a4a7 (patch) | |
| tree | 4748bb1124ae6956002fee18b8d55010d62f2843 /scripts | |
| parent | ceede6a03f0d6f34f123ba06396d61282112f512 (diff) | |
| download | anaconda-52a586a5fb47f463bdc91021791bf74ee050a4a7.tar.gz anaconda-52a586a5fb47f463bdc91021791bf74ee050a4a7.tar.xz anaconda-52a586a5fb47f463bdc91021791bf74ee050a4a7.zip | |
Unmount everything in /mnt/install from anaconda-cleanup.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/anaconda-cleanup | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup index 528b530ab..7e7d17566 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") or \ + 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") |
