SPECS: bootchart.spec - invoke previous init= if it was specified ...
glen
glen at pld-linux.org
Tue Dec 5 22:44:28 CET 2006
Author: glen Date: Tue Dec 5 21:44:28 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- invoke previous init= if it was specified
- do not remove from grubby on upgrades
---- Files affected:
SPECS:
bootchart.spec (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SPECS/bootchart.spec
diff -u SPECS/bootchart.spec:1.5 SPECS/bootchart.spec:1.6
--- SPECS/bootchart.spec:1.5 Tue Dec 5 22:34:33 2006
+++ SPECS/bootchart.spec Tue Dec 5 22:44:23 2006
@@ -3,7 +3,7 @@
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
@@ -109,16 +109,21 @@
# 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
@@ -144,6 +149,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.6 2006/12/05 21:44:23 glen
+- invoke previous init= if it was specified
+- do not remove from grubby on upgrades
+
Revision 1.5 2006/12/05 21:34:33 glen
- R: for -logger
- ignore errors from grubby
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/bootchart.spec?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list