| Revision: | 1.1 |
| Committed: | Tue Feb 27 12:06:08 2007 UTC (19 years, 7 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 | failed-upgrade|abort-upgrade) | ||
| 5 | if [ -d /var/lib/games/crossfire/ ] ; then | ||
| 6 | #only if we really moved everything | ||
| 7 | if [ "`ls /var/lib/games/crossfire/ | wc -l`" -eq 0 ] ; then | ||
| 8 | if [ -d /var/games/crossfire/ ] ; then | ||
| 9 | echo "moving files and directories back to /var/lib/games/crossfire/" | ||
| 10 | mv /var/games/crossfire/* /var/lib/games/crossfire/ ||true | ||
| 11 | fi | ||
| 12 | fi | ||
| 13 | fi | ||
| 14 | ;; | ||
| 15 | |||
| 16 | abort-install) | ||
| 17 | # do nothing | ||
| 18 | ;; | ||
| 19 | |||
| 20 | purge) | ||
| 21 | if [ -e /usr/share/debconf/confmodule ] ; then | ||
| 22 | . /usr/share/debconf/confmodule | ||
| 23 | db_purge | ||
| 24 | fi | ||
| 25 | ##purge game files | ||
| 26 | if [ -d /var/games/crossfire/ ] ; then | ||
| 27 | if [ "`ls /var/games/crossfire/ | wc -l`" -gt 0 ] ; then | ||
| 28 | echo "purging /var/games/crossfire/ and it's contents" | ||
| 29 | rm -rf /var/games/crossfire/ ||true | ||
| 30 | fi | ||
| 31 | fi | ||
| 32 | ##purge logfiles | ||
| 33 | if [ -d /var/log/crossfire/ ] ; then | ||
| 34 | if [ "`ls /var/log/crossfire/ | wc -l`" -gt 0 ] ; then | ||
| 35 | echo "purging /var/games/crossfire/ and it's contents" | ||
| 36 | rm -rf /var/log/crossfire/ ||true | ||
| 37 | fi | ||
| 38 | fi | ||
| 39 | ;; | ||
| 40 | |||
| 41 | upgrade) | ||
| 42 | # do nothing | ||
| 43 | ;; | ||
| 44 | remove|disappear) | ||
| 45 | # remove the 'crossfire' user if it exists | ||
| 46 | # grep ^crossfire: /etc/passwd >/dev/null && { | ||
| 47 | # /usr/sbin/userdel crossfire > /dev/null 2>&1 | ||
| 48 | # } | ||
| 49 | # | ||
| 50 | # remove the 'crossfire' group if it exists | ||
| 51 | # grep ^crossfire: /etc/group >/dev/null || { | ||
| 52 | # /usr/sbin/groupdel crossfire > /dev/null 2>&1 | ||
| 53 | # } | ||
| 54 | ;; | ||
| 55 | *) | ||
| 56 | echo "$0: incorrect arguments: $*" >&2 | ||
| 57 | exit 1 | ||
| 58 | ;; | ||
| 59 | |||
| 60 | esac | ||
| 61 | |||
| 62 | ##DEBHELPER## | ||
| 63 |