Commits

Moises Henriquez  committed b3160ef

Syntax fixes to bootloader.py + Move renaming of initrd if necesarry until after initrd has been created

  • Participants
  • Parent commits 5a69eaf

Comments (0)

Files changed (1)

File vinstall/controller/bootloader.py

         from vinstall.controller import usersetup
         return usersetup.UserSetup
 
-    def disable_bootsplash(self, splash_opt):
+    def disable_bootsplash(self, splash_disabled):
 	"""Disable the bootsplash if asked to by the preference set by splash_opt.
-	splash_opt is a BoolOption"""
+	splash_opt is a Boolean"""
 	ramdiskdir="/mnt/TARGET/boot"
-	if not splash_opt.get_value():
+	if not splash_disabled:
 	    return
-	else
+	else:
 	    # Disable the bootsplash by renaming the initrd.
 	    LOG.debug("Renaming initrd.gz to disable bootsplash animation per user's request")
 	    os.rename(os.path.join(ramdiskdir,"initrd.gz"),
         """
         LOG.debug("Bootloader: %s", bootloader)
         LOG.debug("Target; %s", target)
-	if bootsplash.get_value(): 
-	    LOG.debug("User selected to disable the bootsplash animation")
-	    yield self.disable_bootsplash, (bootsplash,), "Setting bootsplash preference"
         yield self.set_bind_mounts, tuple(), "Mounting pseudo filesystems"
         yield self.depmod, tuple(), "Running depmod"
         yield self.mkinitrd, tuple(), "Creating initrd"
+	if bootsplash: # This will have a True value if it was disabled by the user
+	    LOG.debug("User selected to disable the bootsplash animation.  Scheduling method to disable it.")
+	    yield self.disable_bootsplash, (bootsplash,), "Setting bootsplash preference"
         yield self.install_bootloader, (bootloader, target), "Installing bootloader"
         yield self.clear_bind_mounts, tuple(), "Clearing bind mounts"