[PATCH] anaconda-cleanup: umount /run/media too (#820750)

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

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

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)
---
 scripts/anaconda-cleanup |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 42ef1b2..34e8303 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 mountpoint.startswith("/run/media") \
+        or device.startswith("/dev")) and live_install and not "live" in device:
         os.system("umount %s" % mountpoint)
 
 os.system("udevadm control --env=ANACONDA=1")
-- 
1.7.7.6

_______________________________________________
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