Fix piuparts breakage: ignore delgroup non-existence on purge
[alioth/cvs.git] / debian / postrm
1 #! /bin/sh
2 # $MirOS: contrib/hosted/tg/deb/cvs/debian/postrm,v 1.3 2011/06/11 04:22:48 tg Exp $
3
4 set -e
5
6 case $1 in
7 purge)
8         rm -f /etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf /etc/cron.weekly/cvs
9         test -x /usr/sbin/update-inetd && update-inetd --remove "^cvspserver"
10         (delgroup --system --only-if-empty _cvsadmin || :)
11         ;;
12
13 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
14         ;;
15
16 *)
17         echo >&2 "postrm called with unknown argument '$1'"
18         exit 1
19         ;;
20 esac
21
22 # dh_installdeb will replace this with shell code automatically
23 # generated by other debhelper scripts.
24
25 #DEBHELPER#
26
27 exit 0