[PATCH] Add readonly disks to the ignored list (#772977)
Jesse Keating
jkeating at redhat.com
Wed Jun 27 22:14:16 UTC 2012
If your disk is read-only, we're just going to flat out ignore it and
not offer it to you for anything.
---
pyanaconda/storage/devicetree.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 4cd16cf..d40a82e 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -596,6 +596,14 @@ class DeviceTree(object):
self.addIgnoredDisk(name)
return True
+ # Ignore any readonly disks
+ if udev_device_is_disk(info):
+ ro = open('/sys' + info['sysfs_path'] + '/ro', 'r').read().strip()
+ if ro == '1':
+ log.debug("Ignoring read only device %s" % name)
+ self.addIgnoredDisk(name)
+ return True
+
# FIXME: check for virtual devices whose slaves are on the ignore list
def addUdevLVDevice(self, info):
--
1.7.10.2
More information about the anaconda-patches
mailing list