Revision: | 1.1 |
Committed: | Tue Feb 27 12:06:08 2007 UTC (17 years, 4 months ago) by pippijn |
Branch: | MAIN |
CVS Tags: | rel-2_82, rel-2_81, rel-2_80, rel-3_1, rel-3_0, rel-2_6, rel-2_7, rel-2_4, rel-2_5, rel-2_2, rel-2_3, rel-2_0, rel-2_1, rel-2_72, rel-2_73, rel-2_71, rel-2_76, rel-2_77, rel-2_74, rel-2_75, rel-2_54, rel-2_55, rel-2_56, rel-2_79, rel-2_52, rel-2_53, rel-2_32, rel-2_90, rel-2_92, rel-2_93, rel-2_78, rel-2_61, rel-2_43, rel-2_42, rel-2_41, HEAD |
Log Message: | renamed crossfire to cfplus |
# | User | Rev | Content |
---|---|---|---|
1 | pippijn | 1.1 | #! /bin/sh -e |
2 | |||
3 | case "$1" in | ||
4 | install) | ||
5 | |||
6 | # Commented out until I can find the official policy on users for debian | ||
7 | |||
8 | # create the 'crossfire' group if it doesn't exist | ||
9 | # grep ^crossfire: /etc/group >/dev/null || { | ||
10 | # /usr/sbin/groupadd crossfire > /dev/null 2>&1 | ||
11 | # } | ||
12 | |||
13 | # create 'crossfire' user if absent | ||
14 | # grep ^crossfire: /etc/passwd >/dev/null || { | ||
15 | # /usr/sbin/useradd -d /var/games/crossfire -s /bin/false -g crossfire crossfire | ||
16 | # } | ||
17 | |||
18 | # check for 'crossfire' user and lock the passwd | ||
19 | # grep ^exim: /etc/passwd >/dev/null && { | ||
20 | # /usr/bin/passwd -l crossfire > /dev/null 2>&1 | ||
21 | # } | ||
22 | ;; | ||
23 | |||
24 | upgrade) | ||
25 | # Source debconf library | ||
26 | . /usr/share/debconf/confmodule | ||
27 | if [ -d /var/lib/games/crossfire/ ] ; then | ||
28 | db_input high crossfire-server/ask_upgrade || true | ||
29 | db_go || true | ||
30 | |||
31 | db_get crossfire-server/ask_upgrade || true | ||
32 | if [ "$RET" = "true" ] ; then | ||
33 | if [ ! -d /var/games/crossfire/ ] ; then | ||
34 | echo "moving /var/lib/games/crossfire/ to /var/games/crossfire" | ||
35 | mv -f /var/lib/games/crossfire/ /var/games/ || true | ||
36 | if [ -d /var/lib/games/crossfire/ ] ; then | ||
37 | if [ "`ls /var/lib/games/crossfire/ | wc -l`" -gt 0 ] ; then | ||
38 | echo "Some files remain in /var/lib/games/crossfire/ !" | ||
39 | echo "Please move them to /var/games/crossfire" | ||
40 | fi | ||
41 | fi | ||
42 | fi | ||
43 | fi | ||
44 | |||
45 | fi | ||
46 | db_stop || true | ||
47 | ;; | ||
48 | abort-upgrade) | ||
49 | # do nothing | ||
50 | ;; | ||
51 | |||
52 | *) | ||
53 | echo "$0: incorrect arguments: $*" >&2 | ||
54 | exit 1 | ||
55 | ;; | ||
56 | |||
57 | esac | ||
58 | |||
59 | ##DEBHELPER## | ||
60 |