wok-current rev 5047

improve grub entry in bootchart (thanks allan)
author Rohit Joshi <jozee@slitaz.org>
date Fri Mar 05 09:08:38 2010 +0000 (2010-03-05)
parents 419417e23618
children fa0257184d3c
files bootchart/receipt
line diff
     1.1 --- a/bootchart/receipt	Thu Mar 04 15:01:11 2010 +0000
     1.2 +++ b/bootchart/receipt	Fri Mar 05 09:08:38 2010 +0000
     1.3 @@ -27,12 +27,13 @@
     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 +	   KERNEL_VERSION=`uname -a | cut -d ' ' -f3 | cut -d '-' -f1`
     1.9  	  if [ -f "$1/boot/grub/menu.lst" ]; then
    1.10 -		if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz" $1/boot/grub/menu.lst; then
    1.11 +	   # add an entry only if slitaz is installed and bootchart is not configured
    1.12 +		if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" $1/boot/grub/menu.lst; then
    1.13      		root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
    1.14  			grub_dev=`cat $1/boot/grub/menu.lst | grep "root.* (" | head -n 1`
    1.15 -			# Add new kernel entry in case of upgrade for installed system.
    1.16 +			# Add new kernel entry for bootchart
    1.17      		cat >> $1/boot/grub/menu.lst << EOT
    1.18  
    1.19  title  SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart