author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 26 Feb 2010 01:42:46 +0100 | |
changeset 49 | 59b09b0aeb96 |
parent 32 | 89fb9c6611ca |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/sh |
2 |
# preinst script for mcbot |
|
3 |
# |
|
4 |
# see: dh_installdeb(1) |
|
5 |
||
6 |
set -e |
|
7 |
||
8 |
# summary of how this script can be called: |
|
9 |
# * <new-preinst> `install' |
|
10 |
# * <new-preinst> `install' <old-version> |
|
11 |
# * <new-preinst> `upgrade' <old-version> |
|
12 |
# * <old-preinst> `abort-upgrade' <new-version> |
|
13 |
# for details, see http://www.debian.org/doc/debian-policy/ or |
|
14 |
# the debian-policy package |
|
15 |
||
16 |
||
17 |
case "$1" in |
|
18 |
install|upgrade) |
|
32
89fb9c6611ca
unix system accounts are less than 1000
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
31
diff
changeset
|
19 |
if [ -x /etc/init.d/mcbot ]; |
0 | 20 |
then |
26
767f79e69de1
Debian QoS - Lintian Checks
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
21 |
invoke-rc.d mcbot stop; |
0 | 22 |
fi |
23 |
||
32
89fb9c6611ca
unix system accounts are less than 1000
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
31
diff
changeset
|
24 |
if [ -f /var/lib/mcbot/.mcbotrc ]; |
0 | 25 |
then |
31
bbcb8a3366b4
mcbot needs a proper system account
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
26 |
cp -f /var/lib/mcbot/.mcbotrc /var/lib/mcbot/.mcbotrc.dpkg-old |
0 | 27 |
fi |
28 |
;; |
|
29 |
||
30 |
abort-upgrade) |
|
31 |
;; |
|
32 |
||
33 |
*) |
|
34 |
echo "preinst called with unknown argument \`$1'" >&2 |
|
35 |
exit 1 |
|
36 |
;; |
|
37 |
esac |
|
38 |
||
39 |
# dh_installdeb will replace this with shell code automatically |
|
40 |
# generated by other debhelper scripts. |
|
41 |
||
42 |
#DEBHELPER# |
|
43 |
||
44 |
exit 0 |
|
45 |
||
46 |