File: check_kernel.sh

package info (click to toggle)
dnprogs 2.18-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,896 kB
  • ctags: 3,051
  • sloc: ansic: 18,586; cpp: 9,436; makefile: 669; sh: 502; awk: 13
file content (56 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download
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
50
51
52
53
54
55
56
#!/bin/sh
#
# Check the kernel headers available to us. 
#
#
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
  #
  cp include/kernel/netdnet/dn.h include/netdnet
  echo '*********************************************************************'
  echo I can\'t find a patched kernel in /usr/src.
  echo
  echo If you haven\'t patched your kernel yet then I recommend you do
  echo so before compiling these programs because they certainly won\'t
  echo work without DECnet support in the kernel and it is important
  echo that the programs know which version of the kernel patch you
  echo are using.
  echo
  echo You can still compile the programs without the kernel available by
  echo typing the command \'make please\' but be aware that some of the
  echo programs may not work correctly or at all. If you do this so make 
  echo sure you know what you are doing.
  echo
  return 1
fi
return 0