]> git.pld-linux.org Git - packages/bootchart.git/commitdiff
- invoke previous init= if it was specified
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 5 Dec 2006 21:44:23 +0000 (21:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- do not remove from grubby on upgrades

Changed files:
    bootchart.spec -> 1.6

bootchart.spec

index 6c6ba5a38e875467ce845a0bebfa1aaeae81285c..7a408520a3dd8f94567de36cbccc6d46e287482d 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Boot Process Performance Visualization
 Summary(pl):   Wizualizacja wydajno¶ci procesu startu systemu
 Name:          bootchart
 Version:       0.9
-Release:       1.2
+Release:       1.5
 Epoch:         0
 License:       GPL
 Group:         Base
@@ -108,16 +108,21 @@ fi
 # Add a new grub/lilo entry
 if [ -x /sbin/grubby ]; then
        kernel=$(/sbin/grubby --default-kernel)
-       initrd=$(/sbin/grubby --info=$kernel | sed -n '/^initrd=/{s/^initrd=//;p;q;}')
-       [ ! -z $initrd ] && initrd="--initrd=$initrd"
+       info=$(/sbin/grubby --info=$kernel)
+       initrd=$(echo "$info" | sed -n '/^initrd=/{s/^initrd=//;p;q;}')
+       init=$(echo "$info" |sed -n '/^args=.*init=/{s/^args=.*init=//;s/"$//;p;q;}')
+       [ -n "$initrd" ] && initrd="--initrd=$initrd"
+       [ -n "$init" ] && init="bootchart_init=$init"
        /sbin/grubby --remove-kernel TITLE=%{boottitle}
-       /sbin/grubby --copy-default --add-kernel=$kernel $initrd --args="init=/sbin/bootchartd" --title=%{boottitle} || :
+       /sbin/grubby --copy-default --add-kernel=$kernel $initrd --args="init=/sbin/bootchartd $init" --title=%{boottitle} || :
 fi
 
 %preun logger
-# Remove the grub/lilo entry
-if [ -x /sbin/grubby ]; then
-       /sbin/grubby --remove-kernel TITLE=%{boottitle} || :
+if [ "$1" = 0 ]; then
+       # Remove the grub/lilo entry
+       if [ -x /sbin/grubby ]; then
+               /sbin/grubby --remove-kernel TITLE=%{boottitle} || :
+       fi
 fi
 
 %files
This page took 0.118415 seconds and 4 git commands to generate.