wok-6.x rev 1154
linux: add new entry to grub menu.lst in case of upgrade
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Jul 27 01:18:49 2008 +0200 (2008-07-27) |
parents | 0e74237199bc |
children | c13c815a576c |
files | linux/receipt |
line diff
1.1 --- a/linux/receipt Sun Jul 27 00:57:59 2008 +0200 1.2 +++ b/linux/receipt Sun Jul 27 01:18:49 2008 +0200 1.3 @@ -4,6 +4,7 @@ 1.4 VERSION="2.6.25.5" 1.5 CATEGORY="base-system" 1.6 SHORT_DESC="The Linux kernel and modules." 1.7 +BUILD_DEPENDS="slitaz-toolchain perl" 1.8 MAINTAINER="pascal.bellard@slitaz.org" 1.9 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.10 WEB_SITE="http://www.kernel.org/" 1.11 @@ -81,14 +82,25 @@ 1.12 { 1.13 echo "Processing post-install commands..." 1.14 depmod -a -b "$1/" $VERSION-slitaz 1.15 - cat <<EOT 1.16 + if [ -f "$1/boot/grub/menu.lst" ]; then 1.17 + root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'` 1.18 + grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("` 1.19 + # Add new kernel entry in case of upgrade for installed system. 1.20 + cat >> $1/boot/grub/menu.lst << EOT 1.21 + 1.22 +title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 1.23 +$grub_dev 1.24 + kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev 1.25 +EOT 1.26 + # Display information message. 1.27 + cat <<EOT 1.28 ---- 1.29 -If you have GRUB installed, you can add tree lines to boot SliTaz. 1.30 -Example /boot/grub/menu.lst 1.31 +GRUB is installed, these tree lines has been added to the menu.lst: 1.32 1.33 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 1.34 - root(hd0,0) 1.35 - kernel /boot/vmlinuz-$VERSION-slitaz root=/dev/hda1 vga=771 1.36 +$grub_dev 1.37 + kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev 1.38 ---- 1.39 EOT 1.40 + fi 1.41 }