File: check_kernel.sh

package info (click to toggle)
dnprogs 2.37.2-0.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,380 kB
  • ctags: 3,838
  • sloc: ansic: 24,383; cpp: 10,540; makefile: 753; sh: 553; awk: 13
file content (49 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
#
# Check the kernel headers available to us. 
#
#

# But not for production builds. we assume a 2.4 kernel
if [ -n "$RELEASE" ]
then
  return 0
fi

rm -f include/netdnet/dn.h

if [ -f /usr/src/linux/include/netdnet/dn.h ]
then
  #
  # Eduardo's kernel - only use dn.h if it doesn't define nodeent
  # (which belongs in dnetdb.h)
  #
  grep -q nodeent /usr/src/linux/include/netdnet/dn.h 
  if [ $? = 1 ]
  then
    echo Using dn.h from Eduardo\'s kernel
    cp  /usr/src/linux/include/netdnet/dn.h include/netdnet
  else
    echo Using dn.h from our distribution
    cp include/kernel/netdnet/dn.h include/netdnet
  fi
fi

if [ -f /usr/src/linux/include/linux/dn.h ]
then
  #
  # Steve's kernel
  #
  echo Using dn.h from Steve\'s kernel
  cp  /usr/src/linux/include/linux/dn.h include/netdnet
fi

if [ ! -f include/netdnet/dn.h ]
then
  #
  # Use our fallback include file
  #
  echo Assuming 2.4+ kernel
  cp include/kernel/netdnet/dn.h include/netdnet
fi
return 0