summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-10-12 11:14:58 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-10-15 16:49:25 -1000
commit81a0a090d8e811905449d0d682712371f916798d (patch)
treef294d7f0f2ad70f323607dd7ec89dd99c3c9e90a /storage
parent5372bf1e34bf63bc15bb761447dc56585283082b (diff)
downloadanaconda-81a0a090d8e811905449d0d682712371f916798d.tar.gz
anaconda-81a0a090d8e811905449d0d682712371f916798d.tar.xz
anaconda-81a0a090d8e811905449d0d682712371f916798d.zip
Add dracutSetupData() method to DASDDevice (#526354).
Return kernel parameter information for the DASD. NOTE: This is using the current rd_DASD parameter in dracut, which is just a copy of the dasd= kernel parameter. Will change this once dracut gets a better rd_DASD parameter.
Diffstat (limited to 'storage')
-rw-r--r--storage/devices.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 27cb50121..725b5bc4d 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3163,6 +3163,31 @@ class DASDDevice(DiskDevice):
self.opts = kwargs.get('opts')
DiskDevice.__init__(self, device, kwargs)
+ def dracutSetupString(self):
+ arg = "rd_DASD=%s" % (self.busid,)
+
+ # XXX: Temporary parameter until dracut gets a new rd_DASD option.
+ # Using the old dasd= kernel parameter syntax for now. When dracut
+ # is fixed up, we can use these lines instead:
+ #
+ #for opt in self.opts.keys():
+ # arg += ",%s=%s" % (opt, self.opts[opt],)
+
+ flags = []
+ for opt in self.opts.keys():
+ if self.opts[opt] == "1":
+ if opt == "readonly":
+ flags.append("ro")
+ elif opt == "use_diag":
+ flags.append("diag")
+ else:
+ flags.append(opt)
+
+ if len(flags):
+ arg += "(" + ":".join(flags) + ")"
+
+ return arg
+
class NFSDevice(StorageDevice, NetworkStorageDevice):
""" An NFS device """