summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2012-05-14 09:08:32 -0700
committerBrian C. Lane <bcl@redhat.com>2012-05-14 11:00:12 -0700
commit01e6405dd5edfd0860cca228d8a614fdf6c0f51e (patch)
treee62cda9afc6476d618ae92325e9f1888c6ba5e0b /scripts
parentf5cc445929b64a241948417f1a02972933eb44b7 (diff)
downloadanaconda-01e6405dd5edfd0860cca228d8a614fdf6c0f51e.tar.gz
anaconda-01e6405dd5edfd0860cca228d8a614fdf6c0f51e.tar.xz
anaconda-01e6405dd5edfd0860cca228d8a614fdf6c0f51e.zip
anaconda-cleanup: umount /run/media too (#820750)
Desktop behavior has changed. We need to umount things under /run/media now. This is further complicated by using the liveuser name in the mountpoint. So we now: skip any device with live in the devicename in order to preserve things like /dev/mapper/live-rw skip umounting anyting under /run/initramgs (eg. /run/initramfs/live)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/anaconda-cleanup6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 42ef1b2ac..05a3594cf 100755
--- a/scripts/anaconda-cleanup
+++ b/scripts/anaconda-cleanup
@@ -68,7 +68,7 @@ if not image_install:
# unmount filesystems
for mounted in reversed(open("/proc/mounts").readlines()):
(device, mountpoint, rest) = mounted.split(" ", 2)
- if mountpoint.startswith("/mnt/anactest"):
+ if mountpoint.startswith("/mnt/anactest") or mountpoint.startswith("/run/initramfs"):
continue
# Always clean up anaconda's mountpoints.
@@ -77,8 +77,8 @@ 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 \
- live_install and not "live" in mounted:
+ if ("/media" in mountpoint or device.startswith("/dev")) \
+ and live_install and not "live" in device:
os.system("umount %s" % mountpoint)
os.system("udevadm control --env=ANACONDA=1")