summaryrefslogtreecommitdiffstats
path: root/instdata.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-11-28 15:11:42 -0500
committerChris Lumens <clumens@redhat.com>2007-11-28 15:11:42 -0500
commitc5b08b826f9a8f281a19208c9571dfd5da9cf5a3 (patch)
tree7db9d46c27c10467fc609c081baf8b981fed19db /instdata.py
parent2aac38821cf72d2bbb42a7cb85a89c871c706422 (diff)
downloadanaconda-c5b08b826f9a8f281a19208c9571dfd5da9cf5a3.tar.gz
anaconda-c5b08b826f9a8f281a19208c9571dfd5da9cf5a3.tar.xz
anaconda-c5b08b826f9a8f281a19208c9571dfd5da9cf5a3.zip
Move protected partitions into the Partitions object.
Diffstat (limited to 'instdata.py')
-rw-r--r--instdata.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/instdata.py b/instdata.py
index 8c1d1dcbd..784fdb65f 100644
--- a/instdata.py
+++ b/instdata.py
@@ -70,7 +70,7 @@ class InstallData:
# XXX move fsset and/or diskset into Partitions object?
self.fsset.reset()
self.diskset = partedUtils.DiskSet(self.anaconda)
- self.partitions = partitions.Partitions()
+ self.partitions = partitions.Partitions(self.anaconda)
self.bootloader = bootloader.getBootloader()
self.upgradeRoot = None
self.rootParts = None
@@ -84,6 +84,17 @@ class InstallData:
# XXX I still expect this to die when kickstart is the data store.
self.ksdata = None
+ # We don't have install methods anymore, but put things that depend on
+ # the methodstr here.
+ if os.path.exists("/dev/live") and \
+ stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]):
+ target = os.readlink("/dev/live")
+ self.partitions.protected = [target]
+ elif self.methodstr.startswith("hd://"):
+ method = self.methodstr[5:]
+ device = method.split(":", 3)[0]
+ self.partitions.protected = [device]
+
def setInstallProgressClass(self, c):
self.instProgress = c