#!/bin/sh # # Script to check the header versions against the version of the running # kernel...and complain if need be # Copyright (C) 1997-2000 SpellCaster Telecommunications # $Id: check-hdrs,v 1.1 2004/03/11 03:59:30 bcrl Exp $ # Released under the GNU Public License. See LICENSE file for details. # if [ -f /usr/src/linux/include/linux/compile.h ] then gcc -o mkver mkver.c if [ ! -f mkver ] then exit 1 fi ./mkver >kver diff kver /proc/version >/dev/null 2>&1 ERR=$? typeset -i ERR rm -f mkver kver if [ $ERR -ne 0 ] then echo "************************************************" echo "Kernel headers do not match the running kernel" echo "Please (re)compile and install the kernel for" echo "this system otherwise you risk running with" echo "mismatched kernel header information." echo "************************************************" # exit 1 exit 0 fi echo "************************************************" echo " Kernel version matches kernel headers" echo "************************************************" elif [ ! -e /lib/modules/`uname -r`/build/Makefile ] ; then echo "***********************************************" echo " WARNING: UNABLE TO VERIFY KERNEL VERSION " echo "***********************************************" fi exit 0