fix grub.conf configuration for kernels in a separate /boot partition

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1435 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2008-03-10 09:28:25 +00:00
parent 9c22086307
commit ff6ecb80a4
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
TODO list:
- add "equo match" tool
- make an ETP_DIR switching function
- lilo.conf trigger?
- equo: "you meant...?" feature
+8
View File
@@ -5738,11 +5738,19 @@ class TriggerInterface:
# FIXME: this only supports grub (no lilo support)
def trigger_addbootablekernel(self):
boot_mount = False
if os.path.ismount("/boot"):
boot_mount = True
kernels = [x for x in self.pkgdata['content'] if x.startswith("/boot/kernel-")]
if boot_mount:
kernels = [x[len("/boot"):] for x in kernels]
for kernel in kernels:
initramfs = "/boot/initramfs-"+kernel[13:]
if initramfs not in self.pkgdata['content']:
initramfs = ''
elif boot_mount:
initramfs = initramfs[len("/boot"):]
# configure GRUB
self.Entropy.equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Configuring GRUB bootloader. Adding the new kernel...")
self.Entropy.updateProgress(