# HG changeset patch # User Rohit Joshi # Date 1267780118 0 # Node ID b792559721d174602ae0bbb07535b9c8e31bddc0 # Parent 419417e23618ff7041f6430418e34c44afe6da50 improve grub entry in bootchart (thanks allan) diff -r 419417e23618 -r b792559721d1 bootchart/receipt --- a/bootchart/receipt Thu Mar 04 15:01:11 2010 +0000 +++ b/bootchart/receipt Fri Mar 05 09:08:38 2010 +0000 @@ -27,12 +27,13 @@ post_install() { - KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + KERNEL_VERSION=`uname -a | cut -d ' ' -f3 | cut -d '-' -f1` if [ -f "$1/boot/grub/menu.lst" ]; then - if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz" $1/boot/grub/menu.lst; then + # add an entry only if slitaz is installed and bootchart is not configured + if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" $1/boot/grub/menu.lst; then root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` grub_dev=`cat $1/boot/grub/menu.lst | grep "root.* (" | head -n 1` - # Add new kernel entry in case of upgrade for installed system. + # Add new kernel entry for bootchart cat >> $1/boot/grub/menu.lst << EOT title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart