Hi!

When trying to build an OpenAFS kernel-rpm, the openafs-kvers-is.sh
helper script failed detecting the kernel-type and -version for my
kernel version 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8ksmp.

The attached patch fixes ktype and kvers detection for me.

Apart from this small problem kernel-rpm generation works very smooth,
thanks! (Except for the annoying CONFIG_DEBUG_RODATA which is enabled on
new FC4 and FC5 kernels by default.)

Cheers,
--leo
-- 
-----------------------------------------------------------------------
[EMAIL PROTECTED]                Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria


--- /tmp/openafs-kvers-is.sh	2006-04-17 04:33:11.000000000 +0200
+++ openafs-kvers-is.sh	2006-05-14 19:23:14.042413000 +0200
@@ -10,13 +10,16 @@
 
 if [ "$1" = "parset" ] ; then
   #logger "parsing type from $2"
-  echo "$2" | /bin/sed -e 's/^.*[0-9L]\([^0-9L]*\)/\1/'
+  case "$2" in
+    *smp) echo 'smp' ;;
+    *hugemem) echo 'hugemem' ;;
+  esac
   exit 0
 fi
 
 if [ "$1" = "kvers" ] ; then
   #logger "parsing type from $2"
-  echo "$2" | /bin/sed -e 's/^\(.*[0-9L]\)[^0-9L]*$/\1/'
+  echo "$2" | /bin/sed -re 's/smp$//; s/hugemem$//;'
   exit 0
 fi
 

Reply via email to