summaryrefslogtreecommitdiffstats
path: root/storage/__init__.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-05-01 12:52:32 -0400
committerChris Lumens <clumens@redhat.com>2009-05-01 13:43:31 -0400
commitf2a17f51c770a43f1d046c3a0352d16867b3aaef (patch)
treee19a202ea22d06c5581ffcb0cbb8a6af38ff4e35 /storage/__init__.py
parent033a6c6a7aec6a25bac57d7f0fcd411845f30549 (diff)
downloadanaconda-f2a17f51c770a43f1d046c3a0352d16867b3aaef.tar.gz
anaconda-f2a17f51c770a43f1d046c3a0352d16867b3aaef.tar.xz
anaconda-f2a17f51c770a43f1d046c3a0352d16867b3aaef.zip
Add a ignoreProtected= parameter to deviceImmutable that does the obvious.
This parameter basically means a protected partition cannot be modified or deleted, but can be dealt with on a read-only basis. Right now, the only time we need that is so the hdiso install source can be written out to /etc/fstab.
Diffstat (limited to 'storage/__init__.py')
-rw-r--r--storage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/__init__.py b/storage/__init__.py
index 463d6c127..0bbfdda29 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -479,7 +479,7 @@ class Storage(object):
return dests
- def deviceImmutable(self, device):
+ def deviceImmutable(self, device, ignoreProtected=False):
""" Return any reason the device cannot be modified/removed.
Return False if the device can be removed.
@@ -495,7 +495,7 @@ class Storage(object):
if not isinstance(device, Device):
raise ValueError("arg1 (%s) must be a Device instance" % device)
- if device.name in self.protectedPartitions:
+ if not ignoreProtected and device.name in self.protectedPartitions:
return _("This partition is holding the data for the hard "
"drive install.")
elif isinstance(device, PartitionDevice) and device.isProtected: