~ubuntu-branches/ubuntu/oneiric/openafs/oneiric-201305130334

« back to all changes in this revision

Viewing changes to src/packaging/RedHat/openafs-kvers-is.sh

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# Small helper script for parsing kernel versions and types
3
 
# $Revision: 1.1.2.1 $
 
3
# $Revision: 1.1.2.2 $
4
4
 
5
5
if [ "$1" = "parsev" ] ; then
6
6
  #logger "parsing version from $2"
10
10
 
11
11
if [ "$1" = "parset" ] ; then
12
12
  #logger "parsing type from $2"
13
 
  echo "$2" | /bin/sed -e 's/^.*[0-9L]\([^0-9L]*\)/\1/'
 
13
  case "$2" in
 
14
    *smp) echo 'smp' ;;
 
15
    *hugemem) echo 'hugemem' ;;
 
16
  esac
14
17
  exit 0
15
18
fi
16
19
 
17
20
if [ "$1" = "kvers" ] ; then
18
21
  #logger "parsing type from $2"
19
 
  echo "$2" | /bin/sed -e 's/^\(.*[0-9L]\)[^0-9L]*$/\1/'
 
22
  echo "$2" | /bin/sed -re 's/smp$//; s/hugemem$//;'
20
23
  exit 0
21
24
fi
22
25
 
31
34
  fi
32
35
fi
33
36
 
 
37
# provideskernelarch ksrcdir targetcpu
 
38
if [ "$1" = "provideskernelarch" ]; then
 
39
  kernelrpm=`rpm -qf "$2"`
 
40
  if [ -n "$kernelrpm" ]; then
 
41
    if rpm -q --provides "$kernelrpm" |egrep -q "^kernel(|-devel)-$3 "; then
 
42
      echo 1
 
43
      exit 1
 
44
    fi
 
45
  fi
 
46
  echo 0
 
47
  exit 0
 
48
fi
 
49
 
34
50
#logger "comparing $1 to $2"
35
51
if [ "$1" = "$2" ] ; then
36
52
  #logger "yes"