~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/patches/001_branding

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
## 02_branding.dpatch by Adam Conrad <adconrad@0c3.net>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Changes apache's PLATFORM based on lsb_release output
 
6
 
 
7
BUILD_DIST="($(lsb_release -i -s))"
 
8
 
 
9
if [ $# -ne 1 ]; then
 
10
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
11
    exit 1
 
12
fi
 
13
 
 
14
case "$1" in
 
15
  -patch)
 
16
    if grep -q "${BUILD_DIST}" server/core.c 2>/dev/null; then
 
17
      echo >&2 "`basename $0`: patch already applied"
 
18
      exit 1
 
19
    else
 
20
      # This is where we get our distribution-specific server signature from:
 
21
      sed -i -e "s/(\" PLATFORM \")/${BUILD_DIST}/" server/core.c
 
22
    fi
 
23
  ;;
 
24
  -unpatch) 
 
25
    if grep -q "${BUILD_DIST}" server/core.c 2>/dev/null; then
 
26
      sed -i -e "s/${BUILD_DIST}/(\" PLATFORM \")/" server/core.c
 
27
    else
 
28
      echo >&2 "`basename $0`: patch not yet applied, cannot unpatch"
 
29
      exit 1
 
30
    fi
 
31
  ;;
 
32
  *)
 
33
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
34
    exit 1
 
35
  ;;
 
36
esac