diff options
author | Chris Lumens <clumens@redhat.com> | 2010-03-18 15:27:31 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2010-03-26 14:11:05 -0400 |
commit | 969bc59946f528b273d1309e4e8f489d5821cdcb (patch) | |
tree | 37a44fa250eb335cd59da1119d0343de24101e67 /storage | |
parent | 4a6f11353972d7e46efd5433bd447fd456c50659 (diff) | |
download | anaconda-969bc59946f528b273d1309e4e8f489d5821cdcb.tar.gz anaconda-969bc59946f528b273d1309e4e8f489d5821cdcb.tar.xz anaconda-969bc59946f528b273d1309e4e8f489d5821cdcb.zip |
Turn protected devices into a property on the Anaconda object.
This is needed so I can avoid duplicating the logic of what is and is not
a protected device in the filtering UI.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/__init__.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index e37f9e998..847020154 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -85,18 +85,11 @@ def storageInitialize(anaconda): anaconda.intf.resetReinitInconsistentLVMQuestion() # Set up the protected partitions list now. - if os.path.exists("/dev/live") and \ - stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]): - target = os.readlink("/dev/live") - storage.protectedDevSpecs = [target] - storage.reset() - elif anaconda.methodstr and anaconda.methodstr.startswith("hd:"): - method = anaconda.methodstr[3:] - devspec = method.split(":", 3)[0] - storage.protectedDevSpecs.append(devspec) + if anaconda.protected: + storage.protectedDevSpecs.extend(anaconda.protected) storage.reset() - if not storage.protectedDevices: + if not flags.livecdInstall and not storage.protectedDevices: if anaconda.upgrade: return else: |