summaryrefslogtreecommitdiffstats
path: root/livecd.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-04-18 17:21:14 +0000
committerJeremy Katz <katzj@redhat.com>2007-04-18 17:21:14 +0000
commiteddbc0dbf0b7bc22b42718dfd4a37bdc95f9384d (patch)
tree8731fd99973cefd83d7365eb9a1253c66df21aca /livecd.py
parentea0e9f1d7cfe6d15e22f21328cbb94b953dfa743 (diff)
downloadanaconda-eddbc0dbf0b7bc22b42718dfd4a37bdc95f9384d.tar.gz
anaconda-eddbc0dbf0b7bc22b42718dfd4a37bdc95f9384d.tar.xz
anaconda-eddbc0dbf0b7bc22b42718dfd4a37bdc95f9384d.zip
2007-04-18 Jeremy Katz <katzj@redhat.com>
* isys/isys.py (driveDict): Ignore drives that the live install is running from. This should help avoid trying to install the bootloader to the USB key that you're running the live image off of * livecd.py (LiveCDImageMethod.postAction): Fix unmount to work and re-enable it so that people aren't left with /mnt/sysimage mounted in most cases (LiveCDImageMethod.protectedPartitions): Mark the live image partition as protected
Diffstat (limited to 'livecd.py')
-rw-r--r--livecd.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/livecd.py b/livecd.py
index 44306e106..bb14acd5a 100644
--- a/livecd.py
+++ b/livecd.py
@@ -84,9 +84,27 @@ class LiveCDImageMethod(installmethod.InstallMethod):
custom_buttons=[_("Exit installer")])
sys.exit(0)
-# def postAction(self, anaconda):
-# anaconda.id.fsset.umountFilesystems(anaconda.rootPath,
-# swapoff = False)
+ def postAction(self, anaconda):
+ # unmount things that aren't listed in /etc/fstab. *sigh*
+ for dir in ("/selinux", "/dev"):
+ try:
+ isys.umount("%s/%s" %(anaconda.rootPath,dir), removeDir = 0)
+ except Exception, e:
+ log.error("unable to unmount %s: %s" %(d, e))
+
+ try:
+ anaconda.id.fsset.umountFilesystems(anaconda.rootPath,
+ swapoff = False)
+ os.rmdir(anaconda.rootPath)
+ except Exception, e:
+ log.error("Unable to unmount filesystems.")
+
+ def protectedPartitions(self):
+ if os.path.exists("/dev/live") and \
+ stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]):
+ target = os.readlink("/dev/live")
+ return [target]
+ return []
def getLiveBlockDevice(self):
return self.osimg