This makes the installkernel script build the initramfs
and call update-grub accordingly using 'lsb_release -i -s' to
determine the distribution. Debian or any other Debian
based distribution can add its own entry once someone maps
it out, provided the lsb id tag changes.

Signed-off-by: Luis R. Rodriguez <mcg...@gmail.com>
---

I don't think the debianutils package is always installed but
having this simple script around helps when building kernels.
Is debianutils the right place for it? Can we get Ubuntu
to always just ship it? If so what package should it be
part of? How about Debian? At the very least I expect
this to be available when users want to build kernels.

 installkernel |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/installkernel b/installkernel
index cbb4444..09eced2 100644
--- a/installkernel
+++ b/installkernel
@@ -75,5 +75,16 @@ config="${config}/.config"
 if [ -f "$config" ] ; then
   updatever config "$config"
 fi
+
+LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
+
+case $LSB_RED_ID in
+"Ubuntu")
+       mkinitramfs -o $dir/initrd.img-$ver $ver
+       update-grub
+       ;;
+*)
+       ;;
+esac
  
 exit 0
-- 
1.6.2.2.446.gfbdc0



-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to