--- gen_determineargs.sh.old 2006-09-17 12:40:38.000000000 +0300 +++ gen_determineargs.sh 2006-09-21 15:38:51.000000000 +0300 @@ -34,13 +34,20 @@ get_KV() { EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'` if [ "${PAT}" -gt '4' -a "${VER}" -ge '2' -a -e ${KERNEL_DIR}/.config ] then + local VERSION_SOURCE + KERN_24=0 cd ${KERNEL_DIR} #compile_generic prepare kernel > /dev/null 2>&1 cd - > /dev/null 2>&1 - if [ -f ${KERNEL_DIR}/include/linux/version.h ] + + #2.6.18 uses utsrelease.h + [ -f "${KERNEL_DIR}/include/linux/version.h" ] && VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h" + [ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h" + + if [ -n "${VERSION_SOURCE}" ] then - UTS_RELEASE=`grep UTS_RELEASE ${KERNEL_DIR}/include/linux/version.h | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` + UTS_RELEASE=`grep UTS_RELEASE "${VERSION_SOURCE}" | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` KV=${VER}.${PAT}.${SUB}${EXV}${LOV} else