2009-02-20 08:46:43 +01:00
|
|
|
#!/bin/bash
|
2012-01-31 11:21:58 +01:00
|
|
|
# Copyright (c) 2003, 2004, 2011,2012 SUSE Linux Products GmbH, Germany. All rights reserved.
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# Authors: Thorsten Kukuk <kukuk@suse.de>
|
|
|
|
#
|
2011-07-04 15:26:19 +02:00
|
|
|
|
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
|
|
|
|
if [ `nice` -gt '9' ] ; then
|
|
|
|
echo "Don't modify nice for building glibc!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# get kernel version
|
|
|
|
OFS="$IFS" ; IFS=".-" ; version=(`uname -r`) ; IFS="$OIFS"
|
2012-01-31 11:21:58 +01:00
|
|
|
ARCH=(`uname -m`)
|
2011-11-14 12:03:01 +01:00
|
|
|
|
|
|
|
if test ${version[0]} -gt 2 ; then
|
|
|
|
: # okay
|
|
|
|
elif test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 16 ; then
|
2011-07-04 15:26:19 +02:00
|
|
|
echo "FATAL: kernel too old, need kernel >= 2.6.16 for this package" 1>&2
|
2009-02-20 08:46:43 +01:00
|
|
|
exit 1
|
2012-01-31 11:21:58 +01:00
|
|
|
elif $ARCH -eq 'x86_64' ; then
|
|
|
|
if test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 32 ; then
|
|
|
|
echo "FATAL: kernel too old, need kernel >= 2.6.32 for this package" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-02-20 08:46:43 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|