Commits

Moises Henriquez committed 601cea4

fixes to bootloader backend

Comments (0)

Files changed (1)

vinstall/backend/bootloader.py

 	"""Copy the kernel and initrd to our partition
 	if necessary"""
 	
+        if system.type != "linux":
+	    return
 	if system.root != self.lilo_root:
 	    # Mount the os root partition if needed
 	    umount = False
 	    if not partition.is_mounted():
 	        mountpoint = system.root.replace("/dev/","/mnt/")
 	        if not os.path.exists(mountpoint):
-		    of.makedir(mountpoint)
+		    os.mkdir(mountpoint)
 		partition.mount(mountpoint)
 		umount = True
 
-            targetdir = os.path.split(system.tamu_kernel_path)
+            targetdir = os.path.split(system.tamu_kernel_path)[0]
+	    if not os.path.exists(targetdir):
+	        os.mkdir(targetdir)
 	    # Copy the kernel to the local tamu path
 	    kernel_from = os.path.join(partition.mountpoint, system.kernel)
-	    shutil.copy2(kernel_from, system.tamu_kenel_path)
+	    shutil.copy2(kernel_from, system.tamu_kernel_path)
 	    # Copy the initrd to the local tamu path
 	    if system.initrd:
 	        initrd_from = os.path.join(partition.mountpoint, system.initrd)
         """Install the bootloader
 
         """
-	self.copy_unix_bootdata()
+	for ops in self.operating_systems:
+            self.copy_unix_bootdata(ops)
         return sp.check_call(["/sbin/lilo"])
 
     def test_install(self, config_file, bootdev):