summaryrefslogtreecommitdiffstats
path: root/isys
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 /isys
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 'isys')
-rw-r--r--isys/isys.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py
index c3f0c8c61..06a0b755e 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -20,6 +20,7 @@ import string
import os
import os.path
import socket
+import stat
import posix
import sys
import kudzu
@@ -291,6 +292,17 @@ def driveDict(klassArg):
new[device] = dev
continue
+ # blacklist the device which the live image is running from
+ # installing over that is almost certainly the wrong
+ # thing to do.
+ if os.path.exists("/dev/live") and \
+ stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]):
+ livetarget = os.path.realpath("/dev/live")
+ if livetarget.startswith(devName):
+ log.info("%s looks to be the live device; ignoring" % (device,))
+ continue
+
+
if device.startswith("sd"):
peddev = parted.PedDevice.get(devName)
model = peddev.model