> @@ -1123,15 +1142,30 @@ class GRUB(BootLoader): > grub_root = self.grub_device_name(self.stage2_device) > args.update(["ro", "root=%s" % image.device.fstabSpec]) > args.update(self.boot_args) > - stanza = ("title %(label)s (%(version)s)\n" > - "\troot %(grub_root)s\n" > - "\tkernel %(prefix)s/%(kernel)s %(args)s\n" > - "\tinitrd %(prefix)s/%(initrd)s\n" > - % {"label": image.label, "version": image.version, > - "grub_root": grub_root, > - "kernel": image.kernel, "initrd": image.initrd, > - "args": args, > - "prefix": self.boot_prefix}) > + if isinstance(image, MultibootLinuxBootLoaderImage): > + args.update(image.args) > + stanza = ("title %(label)s (%(version)s)\n" > + "\troot %(grub_root)s\n" > + "\tkernel %(prefix)s/%(multiboot)s %(mbargs)s\n" > + "\tmodule %(prefix)s/%(kernel)s %(args)s\n" > + "\tmodule %(prefix)s/%(initrd)s\n" > + % {"label": image.label, "version": image.version, > + "grub_root": grub_root, > + "multiboot": image.multiboot, > + "mbargs": image.mbargs, > + "kernel": image.kernel, "initrd": image.initrd, > + "args": args, > + "prefix": self.boot_prefix}) > + else: > + stanza = ("title %(label)s (%(version)s)\n" > + "\troot %(grub_root)s\n" > + "\tkernel %(prefix)s/%(kernel)s %(args)s\n" > + "\tinitrd %(prefix)s/%(initrd)s\n" > + % {"label": image.label, "version": image.version, > + "grub_root": grub_root, > + "kernel": image.kernel, "initrd": image.initrd, > + "args": args, > + "prefix": self.boot_prefix}) > else: > stanza = ("title %(label)s\n" > "\trootnoverify %(grub_root)s\n" I'm sure it made sense to do it this way when we only had two possibilities, but now with a third, I'd much prefer that the code to generate a stanza be a method on an Image subclass. > @@ -1905,6 +1939,11 @@ def writeSysconfigKernel(anaconda, default_kernel): > f.write("DEFAULTKERNEL=%s\n" % default_kernel) > f.close() > > +def is_trusted_boot(anaconda): > + if anaconda.backend.ayum.isPackageInstalled(name="tboot"): > + return True > + else: > + return False > > def writeBootloader(anaconda): > """ Write bootloader configuration to disk. This could be simplified to just: return anaconda.backend.ayum.isPackageInstalled(name="tboot") - Chris _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list