FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

 
 
LinkBack Thread Tools
 
Old 04-10-2008, 01:09 PM
Mark McLoughlin
 
Default upd-kernel: Use kernel-uname-r provides to find version string

Recent kernels have changed the format of the version
string, so just use the kernel-uname-r provides to
get it.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
scripts/upd-kernel | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/scripts/upd-kernel b/scripts/upd-kernel
index 3a5483b..66f8da0 100755
--- a/scripts/upd-kernel
+++ b/scripts/upd-kernel
@@ -23,14 +23,8 @@
OLDDIR=`readlink -f $1`
NEWDIR=$2
KRPM=`readlink -f $3`
-KNAME=$(rpm -qp --qf "%{NAME}" $KRPM)
-if [ "$KNAME" != "kernel" ]; then
- var=$(echo $KNAME | sed -e 's/kernel-//')
-fi
-
-ARCH=$(rpm -qp --qf "%{ARCH}" $KRPM)
-NEWVER=$(rpm -qp --qf "%{VERSION}-%{RELEASE}" $KRPM)$var

+NEWVER=$(rpm -qp --provides $KRPM | awk -F ' = ' '/kernel-uname-r/ { print $2; }')

if [ -z "$OLDDIR" -o -z "$NEWDIR" -o -z "$KRPM" ]; then
echo "Usage: $0 <olddir> <newdir> <newkernelrpm>"
--
1.5.4.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org