Mercurial > notdcc
annotate debian/dcc-common.preinst @ 3:b689077d4918
Ignore old patches
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Tue, 10 Mar 2009 14:31:24 +0100 |
parents | f6716cb00029 |
children |
rev | line source |
---|---|
2
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
1 #! /bin/sh |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
2 # preinst script for dcc-common |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
3 # |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
4 # see: dh_installdeb(1) |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
5 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
6 set -e |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
7 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
8 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
9 # summary of how this script can be called: |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
10 # * <new-preinst> `install' |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
11 # * <new-preinst> `install' <old-version> |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
12 # * <new-preinst> `upgrade' <old-version> |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
13 # * <old-preinst> `abort-upgrade' <new-version> |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
14 # |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
15 # for details, see http://www.debian.org/doc/debian-policy/ or |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
16 # the debian-policy package |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
17 # |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
18 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
19 case "$1" in |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
20 install|upgrade) |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
21 if [ "$1" = "upgrade" ]; then |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
22 # if the following two files are real file (and no |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
23 # symlinks), do |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
24 ! test -L /var/lib/dcc/map.txt && mv /var/lib/dcc/map.txt /etc/dcc |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
25 ! test -L /var/lib/dcc/ids && mv /var/lib/dcc/ids /etc/dcc |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
26 if [ -f /etc/dcc/dcc_conf ]; then |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
27 rm -f /etc/dcc/dcc_conf |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
28 fi |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
29 fi |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
30 ;; |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
31 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
32 abort-upgrade) |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
33 ;; |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
34 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
35 *) |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
36 echo "preinst called with unknown argument \`$1'" >&2 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
37 exit 1 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
38 ;; |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
39 esac |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
40 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
41 # dh_installdeb will replace this with shell code automatically |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
42 # generated by other debhelper scripts. |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
43 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
44 #DEBHELPER# |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
45 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
46 exit 0 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
47 |
f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
48 |