wok-6.x rev 5044
improve kernel version in bootchart grub entry (thanks allan)
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Thu Mar 04 11:38:39 2010 +0000 (2010-03-04) |
parents | 92bad8adb911 |
children | e1cbfcb07467 |
files | bootchart/receipt |
line diff
1.1 --- a/bootchart/receipt Thu Mar 04 10:52:50 2010 +0000 1.2 +++ b/bootchart/receipt Thu Mar 04 11:38:39 2010 +0000 1.3 @@ -27,25 +27,26 @@ 1.4 1.5 post_install() 1.6 { 1.7 + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 1.8 if [ -f "$1/boot/grub/menu.lst" ]; then 1.9 - if ! grep -q "vmlinuz-$VERSION-slitaz" $1/boot/grub/menu.lst; then 1.10 + if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz" $1/boot/grub/menu.lst; then 1.11 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` 1.12 grub_dev=`cat $1/boot/grub/menu.lst | grep "root.* (" | head -n 1` 1.13 # Add new kernel entry in case of upgrade for installed system. 1.14 cat >> $1/boot/grub/menu.lst << EOT 1.15 1.16 -title SliTaz GNU/Linux (Kernel $VERSION-slitaz) with bootchart 1.17 +title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart 1.18 $grub_dev 1.19 - kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev init=/sbin/bootchartd 1.20 + kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd 1.21 EOT 1.22 # Display information message. 1.23 cat <<EOT 1.24 ---- 1.25 GRUB is installed, these tree lines has been added to the menu.lst: 1.26 1.27 -title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 1.28 +title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) 1.29 $grub_dev 1.30 - kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev init=/sbin/bootchartd 1.31 + kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd 1.32 ---- 1.33 EOT 1.34 else