Comment 6 for bug 16598

Revision history for this message
Janusz Dziedzic (janusz-dziedzic) wrote :

still exist under ubuntu 12.04. - is that expected?

- first of all
/sbin/installkernel: 30: [: /boot unexpected operator

Seems sh version we have on ubuntu (/bin/sh -> dash
) don't allow == during string comparation.

- seems we also don't need call new-kernel-pkg (if someone need package should/could use make-kpkg).
- lack of update-initramfs and update-grub in installkernel script

Seems Ubuntu still using orginal (RedHat) version of /sbin/installkernel script (??).
As I understand this should be Ubuntu specyfic code and someone from Ubuntu team should rewrite/change this.

Patch:
--- installkernel.orig 2012-08-22 13:35:30.202869387 +0200
+++ installkernel 2012-08-22 13:36:11.822872679 +0200
@@ -27,9 +27,9 @@

 cfgLoader=

-if [ -z "$INSTALL_PATH" -o "$INSTALL_PATH" == "/boot" ]; then
+if [ -z "$INSTALL_PATH" -o "$INSTALL_PATH" = "/boot" ]; then
     INSTALL_PATH=/boot
- cfgLoader=1
+# cfgLoader=1
 fi

 LINK_PATH=/boot
@@ -85,3 +85,7 @@
  fi
  new-kernel-pkg --rpmposttrans $KERNEL_VERSION
 fi
+
+update-initramfs -k $KERNEL_VERSION -c
+update-grub

BR
Janusz