Re: [PATCH 3/4] Write dracut rd_NO_foo options to grub.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK.

On 12/22/2009 09:43 PM, Hans de Goede wrote:
When we don't specify any MD / LVM / DM / LUKS to activate dracut will
activate all found by default, so when we don't specify any write
RD_NO_foo to the kernel cmdline in grub.
---
  booty/bootloaderInfo.py |   13 ++++++++++++-
  1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 6e6d403..3d77254 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -88,16 +88,27 @@ class KernelArguments:

      def getDracutStorageArgs(self):
          args = []
+        types = {}
          root = self.id.storage.rootDevice
          for d in self.id.storage.devices:
              if not root.dependsOn(d):
                  continue

-            args.append(d.dracutSetupString())
+            s = d.dracutSetupString()
+            types[s.split("=")[0]] = True
+            args.append(s)
+
              import storage
              if isinstance(d, storage.devices.NetworkStorageDevice):
                  args.append(self.id.network.dracutSetupString(d))

+        for i in [ [ "rd_LUKS_UUID", "rd_NO_LUKS" ],
+                   [ "rd_LVM_VG", "rd_NO_LVM" ],
+                   [ "rd_MD_UUID", "rd_NO_MD" ],
+                   [ "rd_DM_UUID", "rd_NO_DM" ] ]:
+            if not types.has_key(i[0]):
+                args.append(i[1])
+
          return args

      def get(self):

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux